Sha256: 8968bbca66d5813ed18c2fc300c00d28862ff86f2c73ffef4f6495de1bbd0f45

Contents?: true

Size: 383 Bytes

Versions: 11

Compression:

Stored size: 383 Bytes

Contents

module Locomotive
  module API
    module Helpers
      module LocalesHelper

        include Locomotive::Concerns::SiteDispatcherController

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

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

      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
locomotivecms-4.2.0.alpha2 app/api/locomotive/api/helpers/locales_helper.rb
locomotivecms-4.2.0.alpha1 app/api/locomotive/api/helpers/locales_helper.rb
locomotivecms-4.1.1 app/api/locomotive/api/helpers/locales_helper.rb
locomotivecms-4.1.0 app/api/locomotive/api/helpers/locales_helper.rb
locomotivecms-4.1.0.rc1 app/api/locomotive/api/helpers/locales_helper.rb
locomotivecms-4.0.3 app/api/locomotive/api/helpers/locales_helper.rb
locomotivecms-4.0.2 app/api/locomotive/api/helpers/locales_helper.rb
locomotivecms-4.0.1 app/api/locomotive/api/helpers/locales_helper.rb
locomotivecms-4.0.0 app/api/locomotive/api/helpers/locales_helper.rb
locomotivecms-4.0.0.rc0 app/api/locomotive/api/helpers/locales_helper.rb
locomotivecms-4.0.0.alpha3 app/api/locomotive/api/helpers/locales_helper.rb