Error in link_to

I'm with a problem using link_to.
This is my code:

Listing articles

<%= link_to ‘My Blog’, controller: ‘articles’ %>

<%= link_to ‘New article’, new_article_path %>

<tr>

    <th>Title</th>

    <th>Text</th>

</tr>

<% @articles.each do |article| %>

<tr>

	<td><%= link_to article.title, articles_path(article)  %></td>

	<td><%= article.text %></td>

	<td><%= article.id%></td>

</tr>

<% end %>

``

so this back links as " http://localhost:3000/articles.2 " instead of "http://localhost:3000/articles/2" .
What should I do? I am new to ruby on rais

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

My God! it works!

Thank you Fred, you’re my new superhero.