Skip to content

Commit

Permalink
sort subscription tags (#7941)
Browse files Browse the repository at this point in the history
  • Loading branch information
urvashigupta7 authored May 21, 2020
1 parent 9c726fd commit 438b649
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/stats_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def subscriptions
# .where("node.status = 1")
# .group("term_data.name")
# .count
@tags = @tags.group_by { |_k, v| v / 10 }
@tags = @tags.group_by { |_k, v| v / 10 }.sort_by { |k, _v| -k }
# end
end

Expand Down
2 changes: 1 addition & 1 deletion app/views/stats/subscriptions.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<th>Tags</th>
</thead>
</tr>
<% @tags.reverse_each do |range,tags| %>
<% @tags.each do |range,tags| %>
<tr>
<td>
<%= range * 10 %> - <%= range * 10 + 9 %>
Expand Down

0 comments on commit 438b649

Please sign in to comment.