aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorLuc Donnet2018-04-19 09:46:33 +0200
committerGitHub2018-04-19 09:46:33 +0200
commitca0a4907e5714d6f56ede8d47f2514cdd2752e2f (patch)
tree6f25b8c1b916c0fb9408ca5471ea89fb7799baa2 /app/controllers
parent3396dfd379d5e9f0145b8b40414f0751c2657759 (diff)
parente6c6fb7e7544d840bec4d84f8249ed9d5c01661c (diff)
downloadchouette-core-ca0a4907e5714d6f56ede8d47f2514cdd2752e2f.tar.bz2
Merge pull request #500 from af83/6545-add_generic_navbar
6545 add generic navbar
Diffstat (limited to 'app/controllers')
-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