I am trying to combine one of my applications with controllers and views into subfolders - one for the marketing site and one for the application itself.
This is what I have:
app/controllers
application_controller.rb
...shit ton of other controllers...
This is what I am going to do:
app/controllers/app
application_controller.rb
...all controllers related to the app itself...
app/controllers/marketing
...all controllers related to the marketing site...
The marketing site works just fine because there is no need for authentication, but the application is bombarding b / c devise does not know that application_controller.rb is now in app/controllers/app/application_controller.rb
How can I talk about the location of my controller?
Here are my development routes:
devise_for :users, :skip => [:sessions]
as :user do
get 'login' => 'devise/sessions#new', :as => :new_user_session
post 'login' => 'devise/sessions#create', :as => :user_session
delete 'logout' => 'devise/sessions#destroy', :as => :destroy_user_session
get 'logout' => 'devise/sessions#destroy', :as => :destroy_user_session
end
Part of the stacktrace element:
NameError - uninitialized constant ApplicationController:
activesupport (3.2.12) lib/active_support/dependencies.rb:520:in `load_missing_constant'
activesupport (3.2.12) lib/active_support/dependencies.rb:192:in `block in const_missing'
activesupport (3.2.12) lib/active_support/dependencies.rb:190:in `const_missing'
activesupport (3.2.12) lib/active_support/inflector/methods.rb:230:in `block in constantize'
activesupport (3.2.12) lib/active_support/inflector/methods.rb:229:in `constantize'
activesupport (3.2.12) lib/active_support/core_ext/string/inflections.rb:54:in `constantize'
devise (2.2.4) app/controllers/devise_controller.rb:2:in `<top (required)>'
activesupport (3.2.12) lib/active_support/dependencies.rb:469:in `block in load_file'
activesupport (3.2.12) lib/active_support/dependencies.rb:639:in `new_constants_in'
activesupport (3.2.12) lib/active_support/dependencies.rb:468:in `load_file'
activesupport (3.2.12) lib/active_support/dependencies.rb:353:in `require_or_load'
activesupport (3.2.12) lib/active_support/dependencies.rb:502:in `load_missing_constant'
activesupport (3.2.12) lib/active_support/dependencies.rb:192:in `block in const_missing'
activesupport (3.2.12) lib/active_support/dependencies.rb:190:in `const_missing'
activesupport (3.2.12) lib/active_support/dependencies.rb:514:in `load_missing_constant'
activesupport (3.2.12) lib/active_support/dependencies.rb:192:in `block in const_missing'
activesupport (3.2.12) lib/active_support/dependencies.rb:190:in `const_missing'
activesupport (3.2.12) lib/active_support/dependencies.rb:514:in `load_missing_constant'
activesupport (3.2.12) lib/active_support/dependencies.rb:192:in `block in const_missing'
activesupport (3.2.12) lib/active_support/dependencies.rb:190:in `const_missing'
activesupport (3.2.12) lib/active_support/dependencies.rb:514:in `load_missing_constant'
activesupport (3.2.12) lib/active_support/dependencies.rb:192:in `block in const_missing'
activesupport (3.2.12) lib/active_support/dependencies.rb:190:in `const_missing'
devise (2.2.4) lib/devise/controllers/helpers.rb:80:in `devise_controller?'
devise (2.2.4) lib/devise/controllers/helpers.rb:48:in `authenticate_user!'
source
share