summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md3
-rw-r--r--app/controllers/leaderboard_controller.rb2
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