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