instance method destroy_all

Ruby on Rails 7.0.10

Since v6.1.7.10

Available in: v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

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

Type at least 2 characters to search.

↑↓ navigate · open · esc close