diff options
author | Orhan Toy <toyorhan@gmail.com> | 2019-03-19 14:27:31 +0100 |
---|---|---|
committer | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2019-03-19 09:27:31 -0400 |
commit | e633560db1a2ee3e5946315fc33efad4d7402969 (patch) | |
tree | c4359cb0a8fb294bee753b3624a8dc00486f90db /activerecord | |
parent | 7fe3c69331175a64f01ef64e7afab6d9236fbdbc (diff) | |
download | rails-e633560db1a2ee3e5946315fc33efad4d7402969.tar.gz rails-e633560db1a2ee3e5946315fc33efad4d7402969.tar.bz2 rails-e633560db1a2ee3e5946315fc33efad4d7402969.zip |
update_at/on note for ActiveRecord::Relation.update_all (#35461)
* update_at/on note for ActiveRecord::Relation.update_all
* Verbatim updated_at/on
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/relation.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index 37179774fa..6d954a2b2e 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -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 |