From ab5b8375c2a9c696c909ca21179e5b5480cc3b43 Mon Sep 17 00:00:00 2001 From: Daniel Beardsley Date: Thu, 7 Mar 2013 12:17:35 -0700 Subject: [PATCH] Tally: correct the sort order --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 966585c..cd44503 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -57,7 +57,7 @@ module ApplicationHelper total = (options[:total] || total_from_tallies(tallies)) percent = 100.0 / total.to_f rows = tallies.map {|value, count| [(count.to_f * percent), value]} \ - .sort {|a, b| a[0] <=> b[0]} + .sort {|a, b| b[0] <=> a[0]} render "problems/tally_table", :rows => rows end -- libgit2 0.21.2