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