rails/rails — pull request #14892 by eileencodes (2014-04-28 18:11:36+00:00)
Title: Breakup complex conditionals on delete

Conditionals in `delete` are complex. We can break them up by calling `delete_all_with_dependency` if `delete_all` is called or if `delete` is called instead not worrrying about `delete_all` in that method.

Instead of checking for dependency and if the association is loaded we can just check if `dependent == :delete_all` and tidy up everything quite a bit.

This is much easier to read and cleaner code.

cc/ @tenderlove