Sha256: c00da02311cebad25880ec658c4d94f107e40a296552beb766b6dc1e48a84e61

Contents?: true

Size: 437 Bytes

Versions: 10

Compression:

Stored size: 437 Bytes

Contents

module Locomotive
  module MyAccountHelper

    def options_for_locale
      Rails.cache.fetch('views/helpers/options_for_locale') do
        Locomotive.config.locales.map do |locale|
          flag_url = path_to_image "locomotive/icons/flags/#{locale}.png"

          [
            I18n.t("locomotive.locales.#{locale}"),
            locale,
            { :"data-flag" => flag_url }
          ]
        end
      end
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
locomotivecms-3.0.1 app/helpers/locomotive/my_account_helper.rb
locomotivecms-3.0.0 app/helpers/locomotive/my_account_helper.rb
locomotivecms-3.0.0.rc7 app/helpers/locomotive/my_account_helper.rb
locomotivecms-3.0.0.rc6 app/helpers/locomotive/my_account_helper.rb
locomotivecms-3.0.0.rc5 app/helpers/locomotive/my_account_helper.rb
locomotivecms-3.0.0.rc4 app/helpers/locomotive/my_account_helper.rb
locomotivecms-3.0.0.rc3 app/helpers/locomotive/my_account_helper.rb
locomotivecms-3.0.0.rc2 app/helpers/locomotive/my_account_helper.rb
locomotivecms-3.0.0.rc1 app/helpers/locomotive/my_account_helper.rb
locomotivecms-3.0.0.pre.beta.1 app/helpers/locomotive/my_account_helper.rb