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:
parent
b791f7dedc
commit
a94315b94e
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue