diff options
author | Ben Woosley <ben.woosley@gmail.com> | 2013-05-10 19:24:56 +0200 |
---|---|---|
committer | Ben Woosley <ben.woosley@gmail.com> | 2013-05-10 19:27:12 +0200 |
commit | 2fcafee250ee24224b8fb8c1d884a48770fe08b3 (patch) | |
tree | 633fc3fa743a5ec4003af60f5dd94ac19b82ee6f /activerecord/lib/active_record | |
parent | 1f11dbf0b4dacede0da1be1a0675e501d1b0fced (diff) | |
download | rails-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.rb | 2 |
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 |