From a94315b94edbaadd97b751e3ab375ea8032dcb79 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sat, 2 Jan 2021 11:05:31 +0900 Subject: [PATCH] `timestamp_attributes_for_update_in_model` is a public method --- activerecord/lib/active_record/insert_all.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/insert_all.rb b/activerecord/lib/active_record/insert_all.rb index 13cd173d84..97c440cd9c 100644 --- a/activerecord/lib/active_record/insert_all.rb +++ b/activerecord/lib/active_record/insert_all.rb @@ -169,7 +169,7 @@ module ActiveRecord end def touch_model_timestamps_unless(&block) - model.send(:timestamp_attributes_for_update_in_model).map do |column_name| + model.timestamp_attributes_for_update_in_model.map do |column_name| if touch_timestamp_attribute?(column_name) "#{column_name}=(CASE WHEN (#{updatable_columns.map(&block).join(" AND ")}) THEN #{model.quoted_table_name}.#{column_name} ELSE CURRENT_TIMESTAMP END)," end