Skip to content

Conversation

neerajsingh0101
Copy link

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)

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)`
@neerajsingh0101
Copy link
Author

This PR also removes deprecation message. Please take a look. Will rebase if things look good. /cc @rafaelfranca @carlosantoniodasilva

rafaelfranca added a commit that referenced this pull request Jul 2, 2013
…ll_callbacks

Do not invoke callbacks when delete_all is called

Conflicts:
	activerecord/CHANGELOG.md
@rafaelfranca rafaelfranca merged commit f319e4a into rails:master Jul 2, 2013
kamipo added a commit to kamipo/rails that referenced this pull request Oct 29, 2016
…delete`

The internal `:dependent` option was introduced at rails#10604.
But currently unused.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants