diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-02-19 14:14:10 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-02-19 14:16:47 +0100 |
commit | 259d33db8cae4f139c4646077f1637a8224dfdb2 (patch) | |
tree | 4c3e10f62ae17e8419578df9cd7ef306dea3dd32 /activerecord/test/models | |
parent | ad5834f20f3749cc0f6d512d23f644c64c6bcc2c (diff) | |
parent | fd38838f29ff0f4514b711c65cafe55c6f21ad2a (diff) | |
download | rails-259d33db8cae4f139c4646077f1637a8224dfdb2.tar.gz rails-259d33db8cae4f139c4646077f1637a8224dfdb2.tar.bz2 rails-259d33db8cae4f139c4646077f1637a8224dfdb2.zip |
Merge pull request #18996 from morgoth/deprecate-more-errors-methods
Deprecate `ActiveModel::Errors` `add_on_empty` and `add_on_blank` methods
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/company.rb | 2 | ||||
-rw-r--r-- | activerecord/test/models/company_in_module.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/models/company.rb b/activerecord/test/models/company.rb index 5a56616eb9..6961f8fd6f 100644 --- a/activerecord/test/models/company.rb +++ b/activerecord/test/models/company.rb @@ -214,7 +214,7 @@ class Account < ActiveRecord::Base protected def check_empty_credit_limit - errors.add_on_empty "credit_limit" + errors.add("credit_limit", :blank) if credit_limit.blank? end private diff --git a/activerecord/test/models/company_in_module.rb b/activerecord/test/models/company_in_module.rb index dae102d12b..bf0a0d1c3e 100644 --- a/activerecord/test/models/company_in_module.rb +++ b/activerecord/test/models/company_in_module.rb @@ -91,7 +91,7 @@ module MyApplication protected def check_empty_credit_limit - errors.add_on_empty "credit_limit" + errors.add("credit_card", :blank) if credit_card.blank? end end end |