Module: UpdateLocaleConcern

Extended by:
ActiveSupport::Concern
Included in:
Admin::BaseController, OwnerDashboardsController, V2Users::BaseController
Defined in:
app/controllers/concerns/update_locale_concern.rb

Overview

typed: ignore frozen_string_literal: true

Instance Method Summary collapse

Instance Method Details

#setup_locale(&action) ⇒ Object



11
12
13
14
15
16
# File 'app/controllers/concerns/update_locale_concern.rb', line 11

def setup_locale(&action)
  loc = _parse_locale(params[:locale])
  I18n.with_locale(loc) do
    Globalize.with_locale(loc, &action)
  end
end