Sha256: a773246bc8557cfaeabc5debeab42174dbe99aa791ffb71c2f1e99f7869f8bbc

Contents?: true

Size: 434 Bytes

Versions: 18

Compression:

Stored size: 434 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, :locale)
        .each_pair { |key, value| result << hidden_field_tag(key, value, id: nil) }

      result.html_safe
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
workarea-core-3.5.27 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.26 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.25 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.23 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.22 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.21 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.20 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.19 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.18 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.17 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.16 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.15 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.14 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.13 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.12 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.11 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.10 app/helpers/workarea/i18n_helper.rb
workarea-core-3.5.9 app/helpers/workarea/i18n_helper.rb