rails/rails — pull request #5517 by robinroestenburg (2012-03-19 21:41:52+00:00)
Title: Refactored method SpawnMethods#apply_finder_options

I refactored the `SpawnMethods#apply_finder_options` a bit. Two things I have done:

* The options `:conditions`, `:include`, `:extend` cannot map directly on a method in `Relation::QueryMethods`. I made the subsitution explicit instead of filtering out the keys from the loop and performing the methods one by one after.
* Extracted the filtering of the invalid and empty options for readability.

All ActiveRecord and Rails tests pass.

##### Deprecate?
I'd like to deprecate the three options: `:conditions`, `:include`, `:extend`. This would mean a lot of (fairly simple) changes in code, test and documentation. Let me know what you think of this - I could add it to the PR.