ActionController::RoutingError(Uninitialized constant AdminsController)

后端 未结 2 1779
孤城傲影
孤城傲影 2021-01-25 11:33

I am using Rails 3 with dhtmlxGrid. I have created a controller called admin in that we defined 3 functions, such as view,data

相关标签:
2条回答
  • 2021-01-25 11:49

    Try changing the name of your controller to AdminsController. Rails seems to prefer plural controller names.

    0 讨论(0)
  • 2021-01-25 11:50

    Just to add on to what @Paul said. Rails really likes it when you use plural for your controllers but at the end of the day if you can match the name of the file admin_controller.rb and the name on the class AdminController then this should also work okay.

    Otherwise the rails convention over configuration methodology dictates the pluralization of the controller names.

    0 讨论(0)
提交回复
热议问题