instance method
touch_all
Ruby on Rails 8.0.4
Since v7.2.3Signature
touch_all(...)
Touches records in batches. Returns the total number of rows affected.
Person.in_batches.touch_all
See Relation#touch_all for details of how each batch is touched.
Parameters
-
...req
Source
# File activerecord/lib/active_record/relation/batches/batch_enumerator.rb, line 86
def touch_all(...)
sum do |relation|
relation.touch_all(...)
end
end
Defined in activerecord/lib/active_record/relation/batches/batch_enumerator.rb line 86
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Batches::BatchEnumerator