method
each
v8.1.1 -
Show latest stable
- Class:
ActiveRecord::Batches::BatchEnumerator
each(&block)public
Yields an ActiveRecord::Relation object for each batch of records.
Person.in_batches.each do |relation| relation.update_all(awesome: true) end