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.28 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.5 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.27 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.4 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.26 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.3 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.25 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.2 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.24 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.1 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.23 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.22 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.0 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.21 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.0.beta.1 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.20 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.19 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.18 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.17 app/helpers/workarea/i18n_helper.rb
workarea-core-3.4.16 app/helpers/workarea/i18n_helper.rb