Skip to content

Commit

Permalink
Actually sort pens leader board by count
Browse files Browse the repository at this point in the history
  • Loading branch information
ujh committed Jun 13, 2024
1 parent 76b09c2 commit 36af8f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/leader_board.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def self.pens_by_popularity(force: false)
.map do |model|
{ name: model.name, count: model.collected_pens.size }
end
.sort_by { |h| h[:count] }
.reverse
end
end

Expand Down

0 comments on commit 36af8f6

Please sign in to comment.