diff options
author | Eddie Lebow <elebow@users.noreply.github.com> | 2018-02-14 21:33:02 -0500 |
---|---|---|
committer | Jeremy Daer <jeremydaer@gmail.com> | 2018-02-17 13:58:54 -0800 |
commit | 5645149d3a27054450bd1130ff5715504638a5f5 (patch) | |
tree | 86605ba3daab883939eda991d6f975c07cdff681 /activerecord/test/cases/validations | |
parent | 56278a7a1e2efcf080259459f4f0ab40f29b1fca (diff) | |
download | rails-5645149d3a27054450bd1130ff5715504638a5f5.tar.gz rails-5645149d3a27054450bd1130ff5715504638a5f5.tar.bz2 rails-5645149d3a27054450bd1130ff5715504638a5f5.zip |
Deprecate update_attributes and update_attributes!
Closes #31998
Diffstat (limited to 'activerecord/test/cases/validations')
-rw-r--r-- | activerecord/test/cases/validations/length_validation_test.rb | 2 | ||||
-rw-r--r-- | activerecord/test/cases/validations/uniqueness_validation_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/validations/length_validation_test.rb b/activerecord/test/cases/validations/length_validation_test.rb index 73422a31cd..62cd89041a 100644 --- a/activerecord/test/cases/validations/length_validation_test.rb +++ b/activerecord/test/cases/validations/length_validation_test.rb @@ -56,7 +56,7 @@ class LengthValidationTest < ActiveRecord::TestCase assert owner.save pet_count = Pet.count - assert_not owner.update_attributes pets_attributes: [ { _destroy: 1, id: pet.id } ] + assert_not owner.update pets_attributes: [ { _destroy: 1, id: pet.id } ] assert_not_predicate owner, :valid? assert_predicate owner.errors[:pets], :any? assert_equal pet_count, Pet.count diff --git a/activerecord/test/cases/validations/uniqueness_validation_test.rb b/activerecord/test/cases/validations/uniqueness_validation_test.rb index 1fa94a5b75..941aed5402 100644 --- a/activerecord/test/cases/validations/uniqueness_validation_test.rb +++ b/activerecord/test/cases/validations/uniqueness_validation_test.rb @@ -62,7 +62,7 @@ class TopicWithAfterCreate < Topic after_create :set_author def set_author - update_attributes!(author_name: "#{title} #{id}") + update!(author_name: "#{title} #{id}") end end |