diff --git a/lib/open_fest/app/controllers/concerns/open_fest/users/devise_controller.rb b/lib/open_fest/app/controllers/concerns/open_fest/users/devise_controller.rb new file mode 100644 index 0000000..f007868 --- /dev/null +++ b/lib/open_fest/app/controllers/concerns/open_fest/users/devise_controller.rb @@ -0,0 +1,8 @@ +module OpenFest::Users::DeviseController + extend ActiveSupport::Concern + + included do + before_filter :require_current_conference! + layout 'open_fest/application' + end +end diff --git a/lib/open_fest/app/controllers/open_fest/users/confirmations_controller.rb b/lib/open_fest/app/controllers/open_fest/users/confirmations_controller.rb index 1711d83..04ea83d 100644 --- a/lib/open_fest/app/controllers/open_fest/users/confirmations_controller.rb +++ b/lib/open_fest/app/controllers/open_fest/users/confirmations_controller.rb @@ -1,3 +1,3 @@ class OpenFest::Users::ConfirmationsController < Devise::ConfirmationsController - layout 'open_fest/application' + include OpenFest::Users::DeviseController end diff --git a/lib/open_fest/app/controllers/open_fest/users/passwords_controller.rb b/lib/open_fest/app/controllers/open_fest/users/passwords_controller.rb index 0494492..be5e06e 100644 --- a/lib/open_fest/app/controllers/open_fest/users/passwords_controller.rb +++ b/lib/open_fest/app/controllers/open_fest/users/passwords_controller.rb @@ -1,3 +1,3 @@ class OpenFest::Users::PasswordsController < Devise::PasswordsController - layout 'open_fest/application' + include OpenFest::Users::DeviseController end diff --git a/lib/open_fest/app/controllers/open_fest/users/registrations_controller.rb b/lib/open_fest/app/controllers/open_fest/users/registrations_controller.rb index 8abb715..697875e 100644 --- a/lib/open_fest/app/controllers/open_fest/users/registrations_controller.rb +++ b/lib/open_fest/app/controllers/open_fest/users/registrations_controller.rb @@ -1,3 +1,3 @@ class OpenFest::Users::RegistrationsController < Devise::RegistrationsController - layout 'open_fest/application' + include OpenFest::Users::DeviseController end diff --git a/lib/open_fest/app/controllers/open_fest/users/sessions_controller.rb b/lib/open_fest/app/controllers/open_fest/users/sessions_controller.rb index 71073fc..98e6f1f 100644 --- a/lib/open_fest/app/controllers/open_fest/users/sessions_controller.rb +++ b/lib/open_fest/app/controllers/open_fest/users/sessions_controller.rb @@ -1,3 +1,3 @@ class OpenFest::Users::SessionsController < Devise::SessionsController - layout 'open_fest/application' + include OpenFest::Users::DeviseController end diff --git a/lib/open_fest/app/controllers/open_fest/users/unlocks_controller.rb b/lib/open_fest/app/controllers/open_fest/users/unlocks_controller.rb index fc1d2f9..f6175d9 100644 --- a/lib/open_fest/app/controllers/open_fest/users/unlocks_controller.rb +++ b/lib/open_fest/app/controllers/open_fest/users/unlocks_controller.rb @@ -1,3 +1,3 @@ class OpenFest::Users::UnlocksController < Devise::UnlocksController - layout 'open_fest/application' + include OpenFest::Users::DeviseController end