aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/type/unsigned_integer_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* `type_cast_for_database` -> `serialize`Sean Griffin2015-02-171-2/+2
|
* Move integer range validation to never raise on assignmentSean Griffin2015-01-231-2/+2
| | | | | | | | | | | | | | | | | Given that this was originally added to normalize an error that would have otherwise come from the database (inconsistently), it's more natural for us to raise in `type_cast_for_database`, rather than `type_cast_from_user`. This way, things like numericality validators can handle it instead if the user chooses to do so. It also fixes an issue where assigning an out of range value would make it impossible to assign a new value later. This fixes several vague issues, none of which were ever directly reported, so I have no issue number to give. Places it was mentioned which I can remember: - https://github.com/thoughtbot/shoulda-matchers/blob/9ba21381d7caf045053a81f32df7de2f49687820/lib/shoulda/matchers/active_model/allow_value_matcher.rb#L261-L263 - https://github.com/rails/rails/issues/18653#issuecomment-71197026
* Remove unused lineRyuta Kamizono2014-12-171-1/+0
|
* Fix undesirable RangeError by Type::Integer. Add Type::UnsignedInteger.Ryuta Kamizono2014-12-121-0/+18