A model has only one column, a numeric and the class definition has no
create_table "examples"do |t|
in IRB I create a row, save it, and then attempt to assign "abcd" to
the attribute. Clearly this is wrong, and in fact the assignment does
not take place. I would like however to trap this error, which I
cannot seem to do. Example below:
t = Example.create(:numbid => 4)
=> #<Example id: 3, numberid: 4>
t.numberid = "mmmm"
Is there a configuration option to make this kind of assignment
"noisy" in some way so I can trap the error and provide a meaningful
message to the user?
Thanks for any help,