rails/rails — pull request #10561 by Empact (2013-05-10 19:04:21+00:00)
Title: Rather than raising ThrowResult when construct_limited_ids_conditions comes up empty, set the relation to NullRelation and rely on its results.

This will help avoid errors like 2fcafee, because in most cases NullRelation will do the right thing. Minor bonus is avoiding the use of exceptions for flow control.