Sha256: f4001648dece908a07bcee3ed357ee2ff9c3e84362ca534cd46bcfa0a7205248

Contents?: true

Size: 408 Bytes

Versions: 145

Compression:

Stored size: 408 Bytes

Contents

module Avo
  module Fields
    class CurrencyField < BaseField
      attr_reader :currency
      attr_reader :locale

      def initialize(id, **args, &block)
        super(id, **args, &block)

        @currency = args[:currency].present? ? args[:currency].to_s : Avo.configuration.currency
        @locale = args[:locale].present? ? args[:locale].to_s : Avo.configuration.locale
      end
    end
  end
end

Version data entries

145 entries across 145 versions & 1 rubygems

Version Path
avo-2.5.2.pre.5 lib/avo/fields/currency_field.rb
avo-2.5.2.pre.4 lib/avo/fields/currency_field.rb
avo-2.5.2.pre.3 lib/avo/fields/currency_field.rb
avo-2.5.2.pre.2 lib/avo/fields/currency_field.rb
avo-2.5.2.pre.1 lib/avo/fields/currency_field.rb
avo-2.5.1 lib/avo/fields/currency_field.rb
avo-2.5.0 lib/avo/fields/currency_field.rb
avo-2.4.1 lib/avo/fields/currency_field.rb
avo-2.4.0 lib/avo/fields/currency_field.rb
avo-2.3.1.pre.6 lib/avo/fields/currency_field.rb
avo-2.3.1.pre.5 lib/avo/fields/currency_field.rb
avo-2.3.1.pre.4 lib/avo/fields/currency_field.rb
avo-2.3.1.pre.3 lib/avo/fields/currency_field.rb
avo-2.3.1.pre.2 lib/avo/fields/currency_field.rb
avo-2.3.1.pre.1 lib/avo/fields/currency_field.rb
avo-2.3.0 lib/avo/fields/currency_field.rb
avo-2.2.2 lib/avo/fields/currency_field.rb
avo-2.2.1 lib/avo/fields/currency_field.rb
avo-2.2.0 lib/avo/fields/currency_field.rb
avo-2.1.2.pre2 lib/avo/fields/currency_field.rb