When you call find_each method, Ruby on Rails uses batch processing under the hood. See Active Record Batches.
Example:
Person.find_each(&:recover_from_last_night!)
Default batch size is 1000 but you can change it:
Person.find_each(batch_size: 50)