Sha256: 2df6eb151a6c4ee0d17714d3a65d3deafd349679c944e6a0095deed3e931efd3
Contents?: true
Size: 351 Bytes
Versions: 40
Compression:
Stored size: 351 Bytes
Contents
module Agilibox::ActiveRecordCommaTypeCast def cast_value(value) if value.is_a?(String) super value.tr(",", ".").gsub(/[^-0-9\.]/, "") else super value end end end ActiveRecord::Type::Decimal.send(:prepend, Agilibox::ActiveRecordCommaTypeCast) ActiveRecord::Type::Float.send(:prepend, Agilibox::ActiveRecordCommaTypeCast)
Version data entries
40 entries across 40 versions & 1 rubygems