update_at/on note for ActiveRecord::Relation.update_all (#35461)

* update_at/on note for ActiveRecord::Relation.update_all

* Verbatim updated_at/on
This commit is contained in:
Orhan Toy 2019-03-19 14:27:31 +01:00 committed by Eileen M. Uchitelle
parent 7fe3c69331
commit e633560db1
1 changed files with 4 additions and 2 deletions

View File

@ -342,6 +342,8 @@ module ActiveRecord
# trigger Active Record callbacks or validations. However, values passed to #update_all will still go through
# Active Record's normal type casting and serialization.
#
# Note: As Active Record callbacks are not triggered, this method will not automatically update +updated_at+/+updated_on+ columns.
#
# ==== Parameters
#
# * +updates+ - A string, array, or hash representing the SET part of an SQL statement.
@ -416,10 +418,10 @@ module ActiveRecord
update_all updates
end
# Touches all records in the current relation without instantiating records first with the updated_at/on attributes
# Touches all records in the current relation without instantiating records first with the +updated_at+/+updated_on+ attributes
# set to the current time or the time specified.
# This method can be passed attribute names and an optional time argument.
# If attribute names are passed, they are updated along with updated_at/on attributes.
# If attribute names are passed, they are updated along with +updated_at+/+updated_on+ attributes.
# If no time argument is passed, the current time is used as default.
#
# === Examples