`order` scope is ignored when using `find_each`.

This commit is contained in:
Guo Xiang Tan 2017-08-07 11:46:18 +09:00
parent 412fa78b1f
commit f496302c2c
1 changed files with 1 additions and 1 deletions
app/models

View File

@ -84,7 +84,7 @@ class Emoji
def self.load_custom
result = []
CustomEmoji.includes(:upload).order(:name).find_each do |emoji|
CustomEmoji.includes(:upload).order(:name).each do |emoji|
result << Emoji.new.tap do |e|
e.name = emoji.name
e.url = emoji.upload&.url