# HG changeset patch # User Nattee Niparnan # Date 2014-09-15 14:53:51 # Node ID 1c02c7fc8a895c6e19031b3da45f8a886e529af6 # Parent f9377b82d873ae633105e8ce10c9076623f574e5 fix bug on calculating best of each lanuage diff --git a/app/controllers/report_controller.rb b/app/controllers/report_controller.rb --- a/app/controllers/report_controller.rb +++ b/app/controllers/report_controller.rb @@ -164,7 +164,7 @@ #sum into best if @by_lang and @by_lang.first - @best = @by_lang.first[1] + @best = @by_lang.first[1].clone @by_lang.each do |lang,prop| if @best[:runtime][:value] >= prop[:runtime][:value] @best[:runtime] = prop[:runtime]