summaryrefslogtreecommitdiff
path: root/app/controllers/autocomplete_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/autocomplete_controller.rb')
-rw-r--r--app/controllers/autocomplete_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/autocomplete_controller.rb b/app/controllers/autocomplete_controller.rb
index 54f78fc8719..59be955599d 100644
--- a/app/controllers/autocomplete_controller.rb
+++ b/app/controllers/autocomplete_controller.rb
@@ -55,7 +55,7 @@ class AutocompleteController < ApplicationController
.limit(AWARD_EMOJI_MAX)
.where(user: current_user)
.group(:name)
- .order(count: :desc, name: :asc)
+ .order('count_all DESC, name ASC')
.count
# Transform from hash to array to guarantee json order