diff --git a/app/controllers/alchemy/admin/passwords_controller.rb b/app/controllers/alchemy/admin/passwords_controller.rb index acfe243..61903cd 100644 --- a/app/controllers/alchemy/admin/passwords_controller.rb +++ b/app/controllers/alchemy/admin/passwords_controller.rb @@ -9,7 +9,7 @@ class PasswordsController < ::Devise::PasswordsController helper "Alchemy::Admin::Base" - layout "alchemy/admin" + layout Alchemy::Devise.layout private diff --git a/app/controllers/alchemy/admin/user_sessions_controller.rb b/app/controllers/alchemy/admin/user_sessions_controller.rb index 2a4241d..8ebcc05 100644 --- a/app/controllers/alchemy/admin/user_sessions_controller.rb +++ b/app/controllers/alchemy/admin/user_sessions_controller.rb @@ -13,7 +13,7 @@ class UserSessionsController < ::Devise::SessionsController helper "Alchemy::Admin::Base" - layout "alchemy/admin" + layout Alchemy::Devise.layout def create authenticate_user! diff --git a/lib/alchemy/devise.rb b/lib/alchemy/devise.rb index e76c77e..1a304eb 100644 --- a/lib/alchemy/devise.rb +++ b/lib/alchemy/devise.rb @@ -37,5 +37,12 @@ def self.devise_modules end module Devise + def self.layout=(value) + @layout = value + end + + def self.layout + @layout || "alchemy/admin" + end end end