diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index 3875d2d87fd33bf348cbd8c6a72dcdd7bcc29803..a6513227506927f1051f282bf3838e55f79d4105 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -508,8 +508,8 @@ def update_counters(counters) update_all updates end - # 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. + # Touches all records in the current relation, setting the +updated_at+/+updated_on+ attributes to the current time or the time specified. + # It does not instantiate the involved models, and it does not trigger Active Record callbacks or validations. # This method can be passed attribute names and an optional time argument. # 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. diff --git a/guides/source/active_record_callbacks.md b/guides/source/active_record_callbacks.md index f6fd47f851a8bf4f48094f598f6e1b8a998fae28..950a9cce57ae3c169120e3a1aa79ccb51320a18d 100644 --- a/guides/source/active_record_callbacks.md +++ b/guides/source/active_record_callbacks.md @@ -247,6 +247,7 @@ Just as with validations, it is also possible to skip callbacks by using the fol * `delete_all` * `increment!` * `increment_counter` +* `touch_all` * `update_column` * `update_columns` * `update_all` diff --git a/guides/source/active_record_validations.md b/guides/source/active_record_validations.md index 0ca15d0e569ae6819eacbef83fa3b60be66147be..aea609d6c338b4691ba860a2c1ef8798508c3bd0 100644 --- a/guides/source/active_record_validations.md +++ b/guides/source/active_record_validations.md @@ -135,6 +135,7 @@ database regardless of its validity. They should be used with caution. * `increment_counter` * `toggle!` * `touch` +* `touch_all` * `update_all` * `update_attribute` * `update_column`