Hello all,
Before rails 4.2, I could write: ActiveRecord::ConnectionAdapters::Column.new(:dummy, nil, type.to_s).type_cast(value)
To type cast value to type, but now that API seems to have changed a lot. How can I do it now?
cheers,
bráulio
Hello all,
Before rails 4.2, I could write: ActiveRecord::ConnectionAdapters::Column.new(:dummy, nil, type.to_s).type_cast(value)
To type cast value to type, but now that API seems to have changed a lot. How can I do it now?
cheers,
bráulio
data_type = :integer.to_s.camelize
ActiveRecord::Type.const_get(data_type).new.send :cast_value, "50.0"