How Rails' Type Casting Works
Have you ever noticed that when you assign a property to an Active Record model and read it back, the value isn’t always the same?
This is because Active Record automatically type casts all input so that it matches the database schema. Depending on the type, this may be incredibly simple, or extremely complex.
Post a comment