diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/calculations.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/calculations.rb b/activerecord/lib/active_record/calculations.rb index e08520f15f..e14700f93b 100644 --- a/activerecord/lib/active_record/calculations.rb +++ b/activerecord/lib/active_record/calculations.rb @@ -230,7 +230,8 @@ module ActiveRecord key = type_cast_calculated_value(row[group_alias], group_column) key = key_records[key] if associated value = row[aggregate_alias] - all << [key, type_cast_calculated_value(value, column, operation)] + all[key] = type_cast_calculated_value(value, column, operation) + all end end |