diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-06-10 18:03:41 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-06-10 18:03:41 -0700 |
commit | f48e7676e9b70884c309d3170b7ae8867e4bd252 (patch) | |
tree | fc9bfb567c383f4e48314a13aee62e03b08f63c3 /activerecord/lib/active_record/relation/finder_methods.rb | |
parent | d17fa452ec1993271ccc6e5035fb27b9c89513cf (diff) | |
parent | 340a93f5026ffb8e877024c23791e8a345605976 (diff) | |
download | rails-f48e7676e9b70884c309d3170b7ae8867e4bd252.tar.gz rails-f48e7676e9b70884c309d3170b7ae8867e4bd252.tar.bz2 rails-f48e7676e9b70884c309d3170b7ae8867e4bd252.zip |
Merge pull request #6521 from Empact/throw-result
Fix that #exists? can blow up with ThrowResult exception
Diffstat (limited to 'activerecord/lib/active_record/relation/finder_methods.rb')
-rw-r--r-- | activerecord/lib/active_record/relation/finder_methods.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb index 21a99800fe..1de69fce76 100644 --- a/activerecord/lib/active_record/relation/finder_methods.rb +++ b/activerecord/lib/active_record/relation/finder_methods.rb @@ -186,6 +186,8 @@ module ActiveRecord end connection.select_value(relation, "#{name} Exists", relation.bind_values) + rescue ThrowResult + false end protected |