title: Ruby on Rails link_to directing to Index instead of Show
body: <p>I am having trouble with some Ruby on Rails code. I have a data structure of nested resources (List has_many Tasks and a Task belongs_to a List). On my List.show page, I have the following line of code:</p>
  
  <pre><code>&lt;td&gt;&lt;%= link_to 'Show Task', list_tasks_path(@list, task) %&gt;&lt;/td&gt;
  </code></pre>
  
  <p>The idea is that this page will link to a "show" page where I can view the details of an individual Task. I want the url to basically be </p>
  
  <pre><code>/lists/:list_id/tasks/:task_id
  </code></pre>
  
  <p>The problem is that the above code is directing me to </p>
  
  <pre><code>/lists/:list_id/tasks.task_id
  </code></pre>
  
  <p>on the index page of Task. How can I tell Rails to send me to the show page instead?</p>
  
  <p>I have tried adding :action => show and :controller => tasks, as well as using show_list_tasks_path(@list, task). I also know that the structure itself is there because my show page works fine if I manually enter /lists/:list_id/tasks/:task_id.</p>
  
  <p>Any help is appreciated. Thank you!</p>
  
  <p>-Sum</p>