Sha256: 4c695ef89182ec33f0ddc7561614ed3e373470d084563f84f9b4ad5630fb8913

Contents?: true

Size: 431 Bytes

Versions: 60

Compression:

Stored size: 431 Bytes

Contents

module Spree
  module Admin
    module CurrencyHelper
      def currency_options(selected_value = nil)
        selected_value ||= Spree::Config[:currency]
        currencies = ::Money::Currency.table.map do |_code, details|
          iso = details[:iso_code]
          [iso, "#{details[:name]} (#{iso})"]
        end
        options_from_collection_for_select(currencies, :first, :last, selected_value)
      end
    end
  end
end

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
spree_backend-3.7.9 app/helpers/spree/admin/currency_helper.rb
spree_backend-4.0.2 app/helpers/spree/admin/currency_helper.rb
spree_backend-3.7.8 app/helpers/spree/admin/currency_helper.rb
spree_backend-4.0.1 app/helpers/spree/admin/currency_helper.rb
spree_backend-3.7.7 app/helpers/spree/admin/currency_helper.rb
spree_backend-4.0.0 app/helpers/spree/admin/currency_helper.rb
spree_backend-4.0.0.rc3 app/helpers/spree/admin/currency_helper.rb
spree_backend-3.7.6 app/helpers/spree/admin/currency_helper.rb
spree_backend-3.7.5 app/helpers/spree/admin/currency_helper.rb
spree_backend-4.0.0.rc2 app/helpers/spree/admin/currency_helper.rb
spree_backend-4.0.0.rc1 app/helpers/spree/admin/currency_helper.rb
spree_backend-4.0.0.beta app/helpers/spree/admin/currency_helper.rb
spree_backend-3.7.4 app/helpers/spree/admin/currency_helper.rb
spree_backend-3.7.3 app/helpers/spree/admin/currency_helper.rb
spree_backend-3.7.2 app/helpers/spree/admin/currency_helper.rb
spree_backend-3.7.1 app/helpers/spree/admin/currency_helper.rb
spree_backend-3.7.0 app/helpers/spree/admin/currency_helper.rb
spree_backend-3.7.0.rc3 app/helpers/spree/admin/currency_helper.rb
spree_backend-3.7.0.rc2 app/helpers/spree/admin/currency_helper.rb
spree_backend-3.7.0.rc1 app/helpers/spree/admin/currency_helper.rb