From 325cb1269cb2aa8e1abe7bc103db3cb47ae5eaf6 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Sun, 30 Apr 2006 20:36:37 +0000 Subject: Namespaced OrderedHash so the Rails implementation does not clash with any others. (fixes #4911) [Julian Tarkhanov] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4318 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/calculations.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/calculations.rb b/activerecord/lib/active_record/calculations.rb index e16bf9e6d7..409466866f 100644 --- a/activerecord/lib/active_record/calculations.rb +++ b/activerecord/lib/active_record/calculations.rb @@ -217,7 +217,7 @@ module ActiveRecord key_records = key_records.inject({}) { |hsh, r| hsh.merge(r.id => r) } end - calculated_data.inject(OrderedHash.new) do |all, row| + calculated_data.inject(ActiveSupport::OrderedHash.new) do |all, row| key = associated ? key_records[row[group_alias].to_i] : type_cast_calculated_value(row[group_alias], group_column) value = row[aggregate_alias] all << [key, type_cast_calculated_value(value, column, operation)] -- cgit v1.2.3