diff options
author | Ben Woosley <ben.woosley@gmail.com> | 2013-05-10 20:57:12 +0200 |
---|---|---|
committer | Ben Woosley <ben.woosley@gmail.com> | 2013-05-10 21:11:03 +0200 |
commit | 118147af53bebf71bf2a1d3ded4fc6491a708697 (patch) | |
tree | 891389917a81df7cd18c42a14a26b2aaa6dda24c /activerecord/lib/active_record/coders | |
parent | a2e607e1055dcede27970ccd7f5b89a1ddee8c32 (diff) | |
download | rails-118147af53bebf71bf2a1d3ded4fc6491a708697.tar.gz rails-118147af53bebf71bf2a1d3ded4fc6491a708697.tar.bz2 rails-118147af53bebf71bf2a1d3ded4fc6491a708697.zip |
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 2fcafee250ee2, because in most cases NullRelation will do the right thing. Minor bonus is avoiding the use of exceptions for flow control.
Diffstat (limited to 'activerecord/lib/active_record/coders')
0 files changed, 0 insertions, 0 deletions