I have a question about how ActiveRecord handles data types.
When I enter text in a text_field (meaning, a field in the GUI) which
belongs to a numeric field in the database, Active Record automaticly
converts it to 0, because that’s what the to_f/to_i method of a string
does. Is it also possible to have Active Record enforce the types, so
that when you enter text for a numeric field, it generates an exception?
A solution which doesn’t involve specifing a method in each model to
manually check for types would be nice…
Thanks in advance.