From 14f30a9b84da9d93219aa9e9759f93ef71ab3c7f Mon Sep 17 00:00:00 2001 From: Luc Donnet Date: Wed, 18 Apr 2018 15:55:19 +0200 Subject: Add layout for devise views, Fix i18n on menu, Delete unused elements Refs #6545 @1 --- app/controllers/application_controller.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'app/controllers/application_controller.rb') 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 -- cgit v1.2.3