aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/json/variable.rb
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2013-05-10 20:57:12 +0200
committerBen Woosley <ben.woosley@gmail.com>2013-05-10 21:11:03 +0200
commit118147af53bebf71bf2a1d3ded4fc6491a708697 (patch)
tree891389917a81df7cd18c42a14a26b2aaa6dda24c /activesupport/lib/active_support/json/variable.rb
parenta2e607e1055dcede27970ccd7f5b89a1ddee8c32 (diff)
downloadrails-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 'activesupport/lib/active_support/json/variable.rb')
0 files changed, 0 insertions, 0 deletions