Sha256: f407dc429de096fa81fec5c3808e6c945612e8ae2811f6d5cfb1577c45bdc9d2

Contents?: true

Size: 269 Bytes

Versions: 9

Compression:

Stored size: 269 Bytes

Contents

module CMS
  module Localize
    extend ActiveSupport::Concern

    included do
      before_action :set_locale
    end

    private

    def set_locale
      I18n.locale = session[:locale] = params[:locale] || session[:locale] || I18n.default_locale
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rails_admin_cms-0.1.1 app/controllers/concerns/cms/localize.rb
rails_admin_cms-0.0.9 app/controllers/concerns/cms/localize.rb
rails_admin_cms-0.0.7 app/controllers/concerns/cms/localize.rb
rails_admin_cms-0.0.6 app/controllers/concerns/cms/localize.rb
rails_admin_cms-0.0.5 app/controllers/concerns/cms/localize.rb
rails_admin_cms-0.0.4 app/controllers/concerns/cms/localize.rb
rails_admin_cms-0.0.3 app/controllers/concerns/cms/localize.rb
rails_admin_cms-0.0.2 app/controllers/concerns/cms/localize.rb
rails_admin_cms-0.0.1 app/controllers/concerns/cms/localize.rb