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:
parent
224e599de2
commit
99e3f093fc
1 changed files with 3 additions and 0 deletions
|
@ -51,6 +51,9 @@ class StatsController < ApplicationController
|
|||
.group("dimensions->>'#{column}'")
|
||||
.sum(:value)
|
||||
.transform_values(&:to_i)
|
||||
.sort_by do |_, v|
|
||||
v.last
|
||||
end.reverse.to_h
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue