From 5645149d3a27054450bd1130ff5715504638a5f5 Mon Sep 17 00:00:00 2001 From: Eddie Lebow Date: Wed, 14 Feb 2018 21:33:02 -0500 Subject: Deprecate update_attributes and update_attributes! Closes #31998 --- activerecord/test/cases/validations/length_validation_test.rb | 2 +- activerecord/test/cases/validations/uniqueness_validation_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/test/cases/validations') 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 -- cgit v1.2.3