5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-16 21:36:21 +00:00

ordenar de menor a mayor

This commit is contained in:
f 2022-04-30 18:20:45 -03:00
parent 224e599de2
commit 99e3f093fc

View file

@ -51,6 +51,9 @@ class StatsController < ApplicationController
.group("dimensions->>'#{column}'") .group("dimensions->>'#{column}'")
.sum(:value) .sum(:value)
.transform_values(&:to_i) .transform_values(&:to_i)
.sort_by do |_, v|
v.last
end.reverse.to_h
end end
end end
end end