diff options
author | Neeraj Singh <neerajdotname@gmail.com> | 2013-03-11 20:50:22 -0400 |
---|---|---|
committer | Neeraj Singh <neerajdotname@gmail.com> | 2013-03-11 20:50:22 -0400 |
commit | c3829d31866870e852a64f8a1236f3287d41783b (patch) | |
tree | 7425e839246fe575012d889a3a9f6c45cc770e05 /guides/w3c_validator.rb | |
parent | cae93be0cac32eaa75746dda00454a26c4654be5 (diff) | |
download | rails-c3829d31866870e852a64f8a1236f3287d41783b.tar.gz rails-c3829d31866870e852a64f8a1236f3287d41783b.tar.bz2 rails-c3829d31866870e852a64f8a1236f3287d41783b.zip |
dependent: :destroy should call destroy_all
Commit https://github.com/rails/rails/pull/9668 shows warning
when `delete_all` is invoked with `:dependent` option
`:destroy`.
Unfortunately invoking `Post.destroy_all` invokes
`post.comments.delete_all` as part of `has_many` callbacks.
This commit ensures that instead `post.comments.destroy_all` is
invoked and in the process no warning is generated.
See issue #9567 for details .
Diffstat (limited to 'guides/w3c_validator.rb')
0 files changed, 0 insertions, 0 deletions