method
each
v7.0.0 -
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