aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorEddie Lebow <elebow@users.noreply.github.com>2018-02-14 21:33:02 -0500
committerJeremy Daer <jeremydaer@gmail.com>2018-02-17 13:58:54 -0800
commit5645149d3a27054450bd1130ff5715504638a5f5 (patch)
tree86605ba3daab883939eda991d6f975c07cdff681 /activerecord/test/models
parent56278a7a1e2efcf080259459f4f0ab40f29b1fca (diff)
downloadrails-5645149d3a27054450bd1130ff5715504638a5f5.tar.gz
rails-5645149d3a27054450bd1130ff5715504638a5f5.tar.bz2
rails-5645149d3a27054450bd1130ff5715504638a5f5.zip
Deprecate update_attributes and update_attributes!
Closes #31998
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/comment.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/models/comment.rb b/activerecord/test/models/comment.rb
index 5ab433f2d9..f0f0576709 100644
--- a/activerecord/test/models/comment.rb
+++ b/activerecord/test/models/comment.rb
@@ -76,7 +76,7 @@ class CommentThatAutomaticallyAltersPostBody < Comment
belongs_to :post, class_name: "PostThatLoadsCommentsInAnAfterSaveHook", foreign_key: :post_id
after_save do |comment|
- comment.post.update_attributes(body: "Automatically altered")
+ comment.post.update(body: "Automatically altered")
end
end
@@ -87,6 +87,6 @@ end
class CommentWithAfterCreateUpdate < Comment
after_create do
- update_attributes(body: "bar")
+ update(body: "bar")
end
end