1
votes

I have a resource called centers defined in routes.rb. When I get localhost:3000/centers centers_controller execute show action instead index. That should not happen according to Ruby on Rails CRUD documentation.

Any idea?

1
Did you try to look into log file as well as try to debug ? What's actually the log saying ?dsounded
provide rake:routes outputJoe Half Face
Welcome to StackOverflow. While someone may get lucky trying to answer this, most of us will need more information like the output of rake routes, and your routes.rb file.steel

1 Answers

6
votes

I have one point. Are you using

   resource :centers 

or

   resources :centers

2nd option has index action, first one not