Class: Underworld::ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Underworld::ApplicationController
- Includes:
- Pundit
- Defined in:
- app/controllers/underworld/application_controller.rb
Direct Known Subclasses
APIController, AssetsController, Dashboard::ApplicationController
Instance Method Summary collapse
Instance Method Details
#set_locale ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/underworld/application_controller.rb', line 7 def set_locale if I18n.available_locales.length > 1 lang = request.env['lang'] || params[:locale] || session[:locale] || I18n.default_locale else lang = I18n.default_locale end session[:locale] = I18n.locale = :"#{lang}" end |