From 790a4d5c051f620d17cc73d33db88bbdcceedee8 Mon Sep 17 00:00:00 2001 From: Patri Date: Wed, 9 Jul 2014 20:51:04 +0200 Subject: [PATCH] Inverse order for list of type of swaps --- app/controllers/reports_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index f26704a..74f92d7 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -102,7 +102,7 @@ class ReportsController < ApplicationController end end total_swaps = @offers_by_tag.map{|k,v| v[:swaps]}.inject(0.0,:+) - @offers_by_tag = @offers_by_tag.each{|k,v| v[:percent] = v[:swaps]/total_swaps*100}.sort_by{|k,v| v[:percent]} + @offers_by_tag = @offers_by_tag.each{|k,v| v[:percent] = v[:swaps]/total_swaps*100}.sort_by{|k,v| v[:percent]}.reverse end end