rails/rails — pull request #4746 by jenslukowski (2012-01-29 20:58:53+00:00)
Title: Test and fix for issue 4718

A test case and a fix for issue 4718 (https://github.com/rails/rails/issues/4718).
The problem lied in line 321 of activerecord/lib/relation/finder_methods.rb:
where_values are not blank in case of subclasses but contained the subclass restriction.
Checking for it should resolve the issue.