Module: Locomotive::API::Helpers::LocalesHelper

Includes:
Concerns::SiteDispatcherController
Defined in:
app/api/locomotive/api/helpers/locales_helper.rb

Instance Method Summary collapse

Instance Method Details

#back_to_default_site_localeObject


8
9
10
# File 'app/api/locomotive/api/helpers/locales_helper.rb', line 8

def back_to_default_site_locale
  ::Mongoid::Fields::I18n.locale = current_site.default_locale
end

#current_content_localeObject


12
13
14
# File 'app/api/locomotive/api/helpers/locales_helper.rb', line 12

def current_content_locale
  ::Mongoid::Fields::I18n.locale
end