Sha256: 6a3ce6d9d10da3b5652320b00643fd1ef63143f4b530fa2fa67522d0d7a4483d
Contents?: true
Size: 405 Bytes
Versions: 20
Compression:
Stored size: 405 Bytes
Contents
# Add a before_filter to set the locale based on the params or the default locale module MnoEnterprise::Concerns::Controllers::I18n extend ActiveSupport::Concern included do before_action :set_locale end def set_locale I18n.locale = if params[:locale] && I18n.available_locales.include?(params[:locale].to_sym) params[:locale] else I18n.default_locale end end end
Version data entries
20 entries across 20 versions & 1 rubygems