I have gerated a scaffold_resource for “news” like so:
script/generate scaffold_resource news
I have also added a route to routes.rb
I have an application-wide layout that contains a menu with the entry:
<%= link_to(“News”, news_path) %>
Now, the odd thing is that this generates /news from
most pages, but the same entry points to /news/1 from
within the news/1 page and from within the edit page for news 1. Similar
it points to /2 from the show and edit pages for news 2.
When a news_path occurs anywhere on an news edit or show page, it does
not link to the index action but to the show action for that specific
I have a couple of other models/views/controllers which all work fine,
only the news part shows this odd (and definitely wrong) behavior.
I tried to add :singular => :news to the route definition, but that did
Is this a bug in RoR?