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-1.4.4 lib/avo/fields/currency_field.rb
avo-1.4.3 lib/avo/fields/currency_field.rb
avo-1.4.2 lib/avo/fields/currency_field.rb
avo-1.4.1 lib/avo/fields/currency_field.rb
avo-1.4.0 lib/avo/fields/currency_field.rb