diff options
Diffstat (limited to 'activemodel/test/models/person_with_validator.rb')
-rw-r--r-- | activemodel/test/models/person_with_validator.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/test/models/person_with_validator.rb b/activemodel/test/models/person_with_validator.rb index 44e78cbc29..fbb28d2a0f 100644 --- a/activemodel/test/models/person_with_validator.rb +++ b/activemodel/test/models/person_with_validator.rb @@ -5,7 +5,7 @@ class PersonWithValidator class PresenceValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) - record.errors[attribute] << "Local validator#{options[:custom]}" if value.blank? + record.errors.add(attribute, message: "Local validator#{options[:custom]}") if value.blank? end end |