diff options
author | Jon Leighton <j@jonathanleighton.com> | 2013-06-07 03:03:18 -0700 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2013-06-07 03:03:18 -0700 |
commit | a68c6cccf05310546e82c4c81fe70818a454bf4e (patch) | |
tree | 85aa3575f831371417d37bfe2f44e6d897d0722f /activerecord/lib/active_record/relation/calculations.rb | |
parent | ec647495ebac9e5ace422b7638962d1e9574cfeb (diff) | |
parent | 118147af53bebf71bf2a1d3ded4fc6491a708697 (diff) | |
download | rails-a68c6cccf05310546e82c4c81fe70818a454bf4e.tar.gz rails-a68c6cccf05310546e82c4c81fe70818a454bf4e.tar.bz2 rails-a68c6cccf05310546e82c4c81fe70818a454bf4e.zip |
Merge pull request #10561 from Empact/nix-throwresult
Rather than raising ThrowResult when construct_limited_ids_conditions comes up empty, set the relation to NullRelation and rely on its results.
Diffstat (limited to 'activerecord/lib/active_record/relation/calculations.rb')
-rw-r--r-- | activerecord/lib/active_record/relation/calculations.rb | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation/calculations.rb b/activerecord/lib/active_record/relation/calculations.rb index e234e02032..ccb48247b7 100644 --- a/activerecord/lib/active_record/relation/calculations.rb +++ b/activerecord/lib/active_record/relation/calculations.rb @@ -106,8 +106,6 @@ module ActiveRecord else relation.calculate(operation, column_name, options) end - rescue ThrowResult - 0 end # Use <tt>pluck</tt> as a shortcut to select one or more attributes without |