aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2013-05-10 19:24:56 +0200
committerBen Woosley <ben.woosley@gmail.com>2013-05-10 19:27:12 +0200
commit2fcafee250ee24224b8fb8c1d884a48770fe08b3 (patch)
tree633fc3fa743a5ec4003af60f5dd94ac19b82ee6f /activerecord/lib/active_record
parent1f11dbf0b4dacede0da1be1a0675e501d1b0fced (diff)
downloadrails-2fcafee250ee24224b8fb8c1d884a48770fe08b3.tar.gz
rails-2fcafee250ee24224b8fb8c1d884a48770fe08b3.tar.bz2
rails-2fcafee250ee24224b8fb8c1d884a48770fe08b3.zip
Fix that #pluck wasn't rescuing ThrowResult, meaning it would blow up when failing to construct_limited_ids_condition.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/relation/calculations.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/relation/calculations.rb b/activerecord/lib/active_record/relation/calculations.rb
index 7239270c4d..308db8227f 100644
--- a/activerecord/lib/active_record/relation/calculations.rb
+++ b/activerecord/lib/active_record/relation/calculations.rb
@@ -189,6 +189,8 @@ module ActiveRecord
end
columns.one? ? result.map!(&:first) : result
end
+ rescue ThrowResult
+ []
end
# Pluck all the ID's for the relation using the table's primary key