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.
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
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more
rake routes
, and your routes.rb file. – steel