aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorLuc Donnet2018-04-18 15:55:19 +0200
committerLuc Donnet2018-04-19 09:31:18 +0200
commit14f30a9b84da9d93219aa9e9759f93ef71ab3c7f (patch)
treef531d2478a62233581b26dfa2ac57fea384bd01b /app/controllers/application_controller.rb
parente5b11ab69698502c1642652e3c1249c2abd573b2 (diff)
downloadchouette-core-14f30a9b84da9d93219aa9e9759f93ef71ab3c7f.tar.bz2
Add layout for devise views, Fix i18n on menu, Delete unused elements Refs #6545 @1
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 8b66e6097..7f071a6a4 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -12,6 +12,7 @@ class ApplicationController < ActionController::Base
# Load helpers in rails engine
helper LanguageEngine::Engine.helpers
+ layout :layout_by_resource
def set_locale
# I18n.locale = session[:language] || I18n.default_locale
@@ -56,4 +57,15 @@ class ApplicationController < ActionController::Base
def after_sign_out_path_for(resource_or_scope)
new_user_session_path
end
+
+ private
+
+ def layout_by_resource
+ if devise_controller?
+ "devise"
+ else
+ "application"
+ end
+ end
+
end