Commit 07a7801c authored by Sean McGivern's avatar Sean McGivern

Fix MySQL failure for emoji autocomplete

Postgres lets you treat `count` as another alias for `COUNT(*)` apparently, even
if that's not the actual alias used.
parent 978b4b9c
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment