Flowdock
method

each

Importance_1
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: 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
Show source
Register or log in to add new notes.