Uninitialized constant “Controller Name”

前端 未结 4 1781
终归单人心
终归单人心 2021-01-17 08:13

I\'m having an error with my routes/resources and controllers.

I have the following in the routes.rb:

# routes.rb
resources :users do  
  resource :s         


        
4条回答
  •  遇见更好的自我
    2021-01-17 08:28

    In your routes.rb you need to specify the controller like this:

    resources :users do
      resource :schedules, controller: 'users/schedules'
    end
    

提交回复
热议问题