From 9bed2269c9dbd2626ab32cbab262c939db1bf1fa Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Wed, 16 Sep 2020 11:33:26 +0900 Subject: [PATCH] AR::Base#write_attribute is a public method --- activerecord/test/cases/attribute_methods_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/activerecord/test/cases/attribute_methods_test.rb b/activerecord/test/cases/attribute_methods_test.rb index 72bdf6d25e..b81ee4e713 100644 --- a/activerecord/test/cases/attribute_methods_test.rb +++ b/activerecord/test/cases/attribute_methods_test.rb @@ -298,13 +298,13 @@ def setup test "write_attribute" do topic = Topic.new - topic.send(:write_attribute, :title, "Still another topic") + topic.write_attribute :title, "Still another topic" assert_equal "Still another topic", topic.title topic[:title] = "Still another topic: part 2" assert_equal "Still another topic: part 2", topic.title - topic.send(:write_attribute, "title", "Still another topic: part 3") + topic.write_attribute "title", "Still another topic: part 3" assert_equal "Still another topic: part 3", topic.title topic["title"] = "Still another topic: part 4" @@ -395,13 +395,13 @@ def topic.write_attribute(attr_name, value) super(attr_name, value.downcase) end - topic.send(:write_attribute, :title, "Yet another topic") + topic.write_attribute :title, "Yet another topic" assert_equal "yet another topic", topic.title topic[:title] = "Yet another topic: part 2" assert_equal "yet another topic: part 2", topic.title - topic.send(:write_attribute, "title", "Yet another topic: part 3") + topic.write_attribute "title", "Yet another topic: part 3" assert_equal "yet another topic: part 3", topic.title topic["title"] = "Yet another topic: part 4" -- GitLab