instance method
delete_all
Ruby on Rails 6.1.7.10
Since v6.1.7.10Signature
delete_all()
Deletes records in batches. Returns the total number of rows affected.
Person.in_batches.delete_all
See Relation#delete_all for details of how each batch is deleted.
Source
# File activerecord/lib/active_record/relation/batches/batch_enumerator.rb, line 49
def delete_all
sum(&:delete_all)
end
Defined in activerecord/lib/active_record/relation/batches/batch_enumerator.rb line 49
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Batches::BatchEnumerator