1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activemodel/lib/active_model
Kir Shatrov 7ec30400e1 Make BigDecimal casting consistent on different platforms
Right now it behaves differently on JRuby:

```
--- expected
+++ actual
@@ -1 +1 @@
-#<BigDecimal:5f3c866c,'0.333333333333333333',18(20)>
+#<BigDecimal:16e0afab,'0.3333333333333333',16(20)>
```

My initial PR (https://github.com/rails/rails/pull/27324)
offered to let the precision to be decided by the platform and
change the test expection, but other contributors suggested
that we should change the default precision in Rails
to be consistent of all platforms.

The value (18) comes from the max default precision that comes
from casting Rational(1/3) to BigDecimal.
2017-01-22 10:28:01 -05:00
..
locale Move the validate! method to ActiveModel::Validations. 2015-02-20 16:05:26 -02:00
serializers Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
type Make BigDecimal casting consistent on different platforms 2017-01-22 10:28:01 -05:00
validations Privatize unneededly protected methods in Active Model 2016-12-24 12:18:16 +09:00
attribute_assignment.rb normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
attribute_methods.rb Privatize unneededly protected methods in Active Model 2016-12-24 12:18:16 +09:00
callbacks.rb No need to :nodoc: private methods 2016-12-24 12:11:06 +09:00
conversion.rb [ci skip] Fix bad examples in rdoc 2016-09-17 14:21:38 +03:00
dirty.rb Update ActiveModel::Dirty Doc [ci skip] 2016-09-16 10:57:04 -04:00
errors.rb Make ActiveModel::Errors backward compatible with 4.2 2016-12-08 16:27:47 -05:00
forbidden_attributes_protection.rb Privatize unneededly protected methods in Active Model 2016-12-24 12:18:16 +09:00
gem_version.rb Start Rails 5.1 development 🎉 2016-05-10 03:46:56 -03:00
lint.rb applies remaining conventions across the project 2016-08-06 20:20:22 +02:00
model.rb Add Action View to Active Model API documentation 2016-12-06 22:37:25 -05:00
naming.rb self. is not needed when calling its own instance method 2017-01-05 19:58:52 +09:00
railtie.rb Use BCrypt's MIN_COST in the test environment for speedier tests 2012-11-14 09:42:54 -06:00
secure_password.rb applies new string literal convention in activemodel/lib 2016-08-06 18:38:02 +02:00
serialization.rb applies new string literal convention in activemodel/lib 2016-08-06 18:38:02 +02:00
test_case.rb Remove dead code from AMo. 2011-12-20 18:38:20 +01:00
translation.rb self. is not needed when calling its own instance method 2017-01-05 19:58:52 +09:00
type.rb Merge pull request #26696 from iainbeeston/only-ruby-types-in-activemodel 2016-12-08 13:45:47 -05:00
validations.rb Privatize unneededly protected methods in Active Model 2016-12-24 12:18:16 +09:00
validator.rb Fix typo 2017-01-10 18:22:52 -05:00
version.rb applies new string literal convention in activemodel/lib 2016-08-06 18:38:02 +02:00