OpenFest: Introduce a DeviseController mixin

This commit is contained in:
Petko Bordjukov 2015-07-20 02:18:31 +03:00 committed by Andrew Radev
parent 5d5a5a1cbf
commit fdbba32378
6 changed files with 13 additions and 5 deletions

View File

@ -0,0 +1,8 @@
module OpenFest::Users::DeviseController
extend ActiveSupport::Concern
included do
before_filter :require_current_conference!
layout 'open_fest/application'
end
end

View File

@ -1,3 +1,3 @@
class OpenFest::Users::ConfirmationsController < Devise::ConfirmationsController
layout 'open_fest/application'
include OpenFest::Users::DeviseController
end

View File

@ -1,3 +1,3 @@
class OpenFest::Users::PasswordsController < Devise::PasswordsController
layout 'open_fest/application'
include OpenFest::Users::DeviseController
end

View File

@ -1,3 +1,3 @@
class OpenFest::Users::RegistrationsController < Devise::RegistrationsController
layout 'open_fest/application'
include OpenFest::Users::DeviseController
end

View File

@ -1,3 +1,3 @@
class OpenFest::Users::SessionsController < Devise::SessionsController
layout 'open_fest/application'
include OpenFest::Users::DeviseController
end

View File

@ -1,3 +1,3 @@
class OpenFest::Users::UnlocksController < Devise::UnlocksController
layout 'open_fest/application'
include OpenFest::Users::DeviseController
end