Sha256: 93a7bb15a1087d0c035aec53f40c1e688a010a927ad5f655ff5050c7c5c742bc
Contents?: true
Size: 324 Bytes
Versions: 5
Compression:
Stored size: 324 Bytes
Contents
class DecimalField < Field def numeric? true end def typecast(value, record) BigDecimal.new(value.to_s) end def untypecast(value, record) BigDecimal.new(value.to_s).to_s end def from_json(value, record) BigDecimal.new(value.to_s).to_s end end Field::TYPES['decimal'] = DecimalField
Version data entries
5 entries across 5 versions & 1 rubygems