method

destroy_all

destroy_all()
public

Destroys records in batches.

Person.where("age < 10").in_batches.destroy_all

See Relation#destroy_all for details of how each batch is destroyed.