From 3d0024935c0eb18025208db2606a966ec9b63dd1 Mon Sep 17 00:00:00 2001 From: David Gay Date: Tue, 22 Jun 2021 22:02:21 -0400 Subject: Make sure skill leaderboards are displayed alphabetically --- app/controllers/leaderboard_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') 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 -- cgit v1.2.3