method

destroy_all

Importance_1
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: BatchEnumerator
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.

Show source
Register or log in to add new notes.