Sha256: 7bafafa0fe72978b7af1f866e56b58a4ec34e58485ed0b086d1735f3cca157fe

Contents?: true

Size: 217 Bytes

Versions: 14

Compression:

Stored size: 217 Bytes

Contents

module Headmin
  module Filter
    class Money < Headmin::Filter::Number
      def cast_value(value)
        super(value) * 100
      end

      def attribute
        "#{@attribute}_cents"
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
headmin-0.6.3 app/models/headmin/filter/money.rb
headmin-0.6.2 app/models/headmin/filter/money.rb
headmin-0.6.1 app/models/headmin/filter/money.rb
headmin-0.6.0 app/models/headmin/filter/money.rb
headmin-0.5.9 app/models/headmin/filter/money.rb
headmin-0.5.8 app/models/headmin/filter/money.rb
headmin-0.5.7 app/models/headmin/filter/money.rb
headmin-0.5.6 app/models/headmin/filter/money.rb
headmin-0.5.5 app/models/headmin/filter/money.rb
headmin-0.5.4 app/models/headmin/filter/money.rb
headmin-0.5.3 app/models/headmin/filter/money.rb
headmin-0.5.2 app/models/headmin/filter/money.rb
headmin-0.5.1 app/models/headmin/filter/money.rb
headmin-0.5.0 app/models/headmin/filter/money.rb