1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

timestamp_attributes_for_update_in_model is a public method

This commit is contained in:
Ryuta Kamizono 2021-01-02 11:05:31 +09:00
parent b791f7dedc
commit a94315b94e

View file

@ -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