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

Projects
None yet
2 participants
@neerajdotname
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)

Neeraj Singh
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)`
@neerajdotname

This comment has been minimized.

Show comment
Hide comment
@neerajdotname

neerajdotname Jul 2, 2013

Member

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

Member

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

Merge pull request #10604 from neerajdotname/delete_all_should_not_ca…
…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

default The Travis CI build passed
Details

kamipo added a commit to kamipo/rails that referenced this pull request Oct 29, 2016

Remove unused internal `:dependent` option in `CollectionAssociation#…
…delete`

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