1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/lib/active_record/validations
Ryuta Kamizono 38066a3d9b Fix numericality validator without precision in Active Record
Test case which was added at #32852 passes in Active Model but doesn't
pass in Active Record since #38210 due to `Float::DIG` has changed to
`BigDecimal.double_fig`.

```ruby
irb(main):001:0> require 'bigdecimal/util'
=> true
irb(main):002:0> 65.6.to_d
=> 0.656e2
irb(main):003:0> 65.6.to_d(Float::DIG)
=> 0.656e2
irb(main):004:0> 65.6.to_d(BigDecimal.double_fig)
=> 0.6559999999999999e2
```
2021-03-14 13:40:25 +09:00
..
absence.rb Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00
associated.rb Fix keyword arguments warnings 2019-09-11 10:48:29 +09:00
length.rb Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00
numericality.rb Fix numericality validator without precision in Active Record 2021-03-14 13:40:25 +09:00
presence.rb Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00
uniqueness.rb MySQL: Uniqueness validator now respects default database collation 2020-10-30 00:25:46 +00:00