ruby on rails - Namespaced Routes give me Unitialized constant Admin::Towers -



ruby on rails - Namespaced Routes give me Unitialized constant Admin::Towers -

the 2 particular routes im having issues admin/inspections , admin/activities. when first save routes.rb, whichever route load first works other not, gives me error: "unitialized constant admin::towers"

i have next routes setup.

namespace :admin #...etc... resources :inspections, only: [:index,:show], controller: 'towers/inspections' resources :activities, only: [:index], controller: 'towers/activities' end

as you've namespaced resources, controllers should reside within app/controllers/admin/* , have name, i.e. inspections: class admin::inspectionscontroller

i'm guessing have:

scope '/admin' resources :inspections, only: [:index,:show], controller: 'towers/inspections' resources :activities, only: [:index], controller: 'towers/activities' end

ruby-on-rails ruby-on-rails-3 rails-routing

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -