Please sign in to comment.
Do not invoke callbacks when delete_all is called
Method `delete_all` should not be invoking callbacks and this feature was deprecated in Rails 4.0. This is being removed. `delete_all` will continue to honor the `:dependent` option. However if `:dependent` value is `:destroy` then the default deletion strategy for that collection will be applied. User can also force a deletion strategy by passing parameter to `delete_all`. For example you can do `@post.comments.delete_all(:nullify)`
- Loading branch information...
Showing with 117 additions and 17 deletions.
- +13 −0 activerecord/CHANGELOG.md
- +29 −13 activerecord/lib/active_record/associations/collection_association.rb
- +2 −2 activerecord/lib/active_record/associations/collection_proxy.rb
- +25 −2 activerecord/test/cases/associations/has_many_associations_test.rb
- +34 −0 activerecord/test/cases/associations/has_many_through_associations_test.rb
- +1 −0 activerecord/test/cases/locking_test.rb
- +6 −0 activerecord/test/models/bulb.rb
- +1 −0 activerecord/test/models/car.rb
- +6 −0 activerecord/test/models/parrot.rb