Sha256: 894dbc21b47a0981b296ae39c9ad71ca2c58a4381f18407ada3fbc47ccd079ca
Contents?: true
Size: 367 Bytes
Versions: 1
Compression:
Stored size: 367 Bytes
Contents
class Underworld::ApplicationController < ActionController::Base include Pundit before_action :set_locale 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 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
underworld-1.0.0 | app/controllers/underworld/application_controller.rb |