Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not invoke callbacks when delete_all is called #10604

Merged
merged 1 commit into from Jul 2, 2013

Conversation

@neerajdotname
Copy link
Member

neerajdotname commented May 13, 2013

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

neerajdotname commented Jul 2, 2013

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
1 check passed
1 check passed
default The Travis CI build passed
Details
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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.