Something peculiar happened when I was doing something trivial.
If you accidently named your restful route the following
resource :roles instead of resources :roles
When you point your app to /roles it won’t go to your index controller action but it will instead call your show action.


it’s got to do with has_many and has_one.
if you do has_one, then your routes should use map.resource
if you do has_many, then your routes should use map.resources
rails is language specific