Flowdock
method

type_cast_from_column

Importance_2
v5.1.7 - Show latest stable - 0 notes - Class: ActiveRecord::ConnectionAdapters::Quoting
type_cast_from_column(column, value) public

If you are having to call this function, you are likely doing something wrong. The column does not have sufficient type information if the user provided a custom type on the class level either explicitly (via Attributes::ClassMethods#attribute) or implicitly (via AttributeMethods::Serialization::ClassMethods#serialize, time_zone_aware_attributes). In almost all cases, the sql type should only be used to change quoting behavior, when the primitive to represent the type doesn’t sufficiently reflect the differences (varchar vs binary) for example. The type used to get this primitive should have been provided before reaching the connection adapter.

Show source
Register or log in to add new notes.