Ruby on Rails
Thursday, February 19, 2015
On Thursday, February 19, 2015 at 10:25:43 AM UTC, Bruno Oliveira wrote:
<td><%= link_to article.title, articles_path(article) %></td>
That should be article_path(article) (note the singular). articles_path returns the path for the collection as a whole. It's not expecting an article so ends up interpreting as the format it should link to, which is why it links to articles.2
Fred
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/d4b5a95e-7fa4-4d5b-9775-3dd4d88f6f7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment