Sha256: 44e3dc29ae8aeb6c4ec04643cd596dd735f5da94d7f878130e4b5b9c73262fdc
Contents?: true
Size: 353 Bytes
Versions: 10
Compression:
Stored size: 353 Bytes
Contents
module Agilibox::ActiveRecordCommaTypeCast def cast_value(value) if value.is_a?(String) super value.gsub(",", ".").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
10 entries across 10 versions & 1 rubygems