Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 8494

Show
Ignore:
Timestamp:
12/27/07 11:18:30 (8 months ago)
Author:
bitsweat
Message:

Ruby 1.9 compat: calculations don't assume array implementation of ordered hash. References #1689 [Frederick Cheung]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activerecord/lib/active_record/calculations.rb

    r8381 r8494  
    231231            key   = key_records[key] if associated 
    232232            value = row[aggregate_alias] 
    233             all << [key, type_cast_calculated_value(value, column, operation)] 
     233            all[key] = type_cast_calculated_value(value, column, operation) 
     234            all 
    234235          end 
    235236        end