- Create a table containing a numeric column.
- Create a scaffold against that table
- Ask that scaffold to create a new record. In the form that's displayed, enter 'wibble' in the field for the numeric column, and click [create].
- The row will be created with zero in the column
To make the issue even worse, you can't validate the input by simply checking the attribute in a validation function. For example, if the column is called 'price', and you enter 'wibble' on the form, by the time you get to the validation function, the attribute 'price' wil already be set to 0. You have to instead manually validate against price_before_type_cast.
I'm guessing most Rails applications don't perform these checks, and that any that don't will silently accept bad data in numeric fields, storing 0 values in the table.