title: Ruby path_to only works when explicit
body: <p>Learning ruby on rails, playing around with routes and path methods.
  I have built a fairly simple application with the models "Book" and "Author". Each author can have many books, every book belongs to an author, etc.</p>
  
  <p>I have an authors controller with the method #list that lists all authors. When it does that, it also echoes out all their books. Now I would like each book to point to books#show with this nifty path method I found.</p>
  
  <p>Here is my snippet:</p>
  
  <pre><code>&lt;% @authors.each do |author| %&gt;
      &lt;li&gt;&lt;%= author.name %&gt;&lt;/li&gt;
      &lt;ul&gt;
          &lt;% author.books.all.each do |book| %&gt;
              &lt;li&gt;&lt;%= link_to book.name, controller: :books, action: :show, id: book.id %&gt;&lt;/li&gt;
          &lt;% end %&gt;
      &lt;/ul&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>With this <code>link_to book.name, controller: :books, action: :show, id: book.id</code> it works fine, but something tells me the same can be achieved much easier. If I use <code>books_show_path(book)</code> it won't work.</p>
  
  <p>My routes look like the following:</p>
  
  <p>root to: 'authors#list'</p>
  
  <pre><code>match 'authors/list' =&gt; 'authors#list'
  match 'books/list' =&gt; 'books#list'
  match 'authors/:id/delete' =&gt; 'authors#delete'
  match 'authors/:id/show' =&gt; 'authors#show'
  match 'books/:id/show' =&gt; 'books#show'
  </code></pre>
  
  <p>What am I doing wrong here? What do I need to do to make <code>books_show_path(book)</code> work?</p>