diff options
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/CHANGELOG.md | 10 | ||||
-rw-r--r-- | activemodel/test/cases/errors_test.rb | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/activemodel/CHANGELOG.md b/activemodel/CHANGELOG.md index a35e20579d..d221eff1e7 100644 --- a/activemodel/CHANGELOG.md +++ b/activemodel/CHANGELOG.md @@ -123,11 +123,13 @@ *Wojciech Wnętrzak* -* Change validates_acceptance_of to accept true by default. +* Change `validates_acceptance_of` to accept `true` by default besides `'1'`. - The default for validates_acceptance_of is now "1" and true. - In the past, only "1" was the default and you were required to add - accept: true. + The default for `validates_acceptance_of` is now `'1'` and `true`. + In the past, only `"1"` was the default and you were required to pass + `accept: true` separately. + + *mokhan* * Remove deprecated `ActiveModel::Dirty#reset_#{attribute}` and `ActiveModel::Dirty#reset_changes`. diff --git a/activemodel/test/cases/errors_test.rb b/activemodel/test/cases/errors_test.rb index 26ba6ba4fb..fbf208836f 100644 --- a/activemodel/test/cases/errors_test.rb +++ b/activemodel/test/cases/errors_test.rb @@ -11,7 +11,7 @@ class ErrorsTest < ActiveModel::TestCase attr_reader :errors def validate! - errors.add(:name, "cannot be nil") if name == nil + errors.add(:name, :blank, message: "cannot be nil") if name == nil end def read_attribute_for_validation(attr) |