instance method
destroy_all
Ruby on Rails 7.0.10
Since v6.1.7.10Signature
destroy_all()
Destroys records in batches.
Person.where("age < 10").in_batches.destroy_all
See Relation#destroy_all for details of how each batch is destroyed.
Source
# File activerecord/lib/active_record/relation/batches/batch_enumerator.rb, line 83
def destroy_all
each(&:destroy_all)
end
Defined in activerecord/lib/active_record/relation/batches/batch_enumerator.rb line 83
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Batches::BatchEnumerator