diff options
author | David Gay <david@davidgay.org> | 2021-06-22 22:02:21 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-06-22 22:02:29 -0400 |
commit | 3d0024935c0eb18025208db2606a966ec9b63dd1 (patch) | |
tree | d3f21b5b7df6d61735d02f3ff467679dce3d05a7 | |
parent | 67881d62653889fbd72ffae889684fa97b547e5a (diff) |
Make sure skill leaderboards are displayed alphabetically
-rw-r--r-- | CHANGELOG.md | 3 | ||||
-rw-r--r-- | app/controllers/leaderboard_controller.rb | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 082a7dd..e6605c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ All notable changes to this project will be documented in this file. ## [0.1.11.3] - 2021-06-22 +### UI +- Leaderboard: Skill leaderboards are now always displayed alphabetically. + ### Fixed - Couldn't unlock rusted lockboxes due to equipment requirement being set incorrectly. diff --git a/app/controllers/leaderboard_controller.rb b/app/controllers/leaderboard_controller.rb index e6e8543..14b8acb 100644 --- a/app/controllers/leaderboard_controller.rb +++ b/app/controllers/leaderboard_controller.rb @@ -2,7 +2,7 @@ class LeaderboardController < ApplicationController def index - @top_per_skill = Hash[Skill.all.map { |s| [s.name.to_sym, CharacterSkill.top_xp_for(s)] }] + @top_per_skill = Hash[Skill.all.order(:name).map { |s| [s.name.to_sym, CharacterSkill.top_xp_for(s)] }] @top_total_xp = Character.top_total_xp @top_total_level = Character.top_total_level end |