Sha256: 2dd7ce6494836054a1e1c723b1d0b240ccbbee9cc3fc346b920f8a14fecb9e93

Contents?: true

Size: 425 Bytes

Versions: 44

Compression:

Stored size: 425 Bytes

Contents

module Workarea
  module I18nHelper
    def locale_options
      I18n.configured_locales.reduce([]) do |memo, locale|
        memo << [I18n.t(:name, locale: locale), locale]
      end
    end

    def switch_locale_fields
      result = ''

      params
        .except(:utf8, :controller, :action)
        .each_pair { |key, value| result << hidden_field_tag(key, value, id: nil) }

      result.html_safe
    end
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
workarea-core-3.4.45 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.44 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.43 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.42 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.41 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.40 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.39 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.38 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.37 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.36 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.35 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.34 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.33 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.32 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.31 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.8 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.30 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.7 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.29 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.6 app/helpers/workarea/i18n_helper.rb