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

Ticket #1689: fix_calculations.diff

File fix_calculations.diff, 0.6 kB (added by fcheung, 10 months ago)

Don't use << on ActiveSupport::OrderedHash in 1.9 since it's really a Hash

  • activerecord/lib/active_record/calculations.rb

    old new  
    230230            key   = type_cast_calculated_value(row[group_alias], group_column) 
    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 
    236237