mirror of
https://github.com/mastodon/mastodon
synced 2024-11-30 15:58:14 +09:00
Use Arel nulls_first
method in ordering CustomEmojiFilter scope (#28614)
This commit is contained in:
parent
832b92ac3e
commit
57f49c8191
@ -31,7 +31,7 @@ class CustomEmojiFilter
|
|||||||
def scope_for(key, value)
|
def scope_for(key, value)
|
||||||
case key.to_s
|
case key.to_s
|
||||||
when 'local'
|
when 'local'
|
||||||
CustomEmoji.local.left_joins(:category).reorder(Arel.sql('custom_emoji_categories.name ASC NULLS FIRST, custom_emojis.shortcode ASC'))
|
CustomEmoji.local.left_joins(:category).reorder(CustomEmojiCategory.arel_table[:name].asc.nulls_first).order(shortcode: :asc)
|
||||||
when 'remote'
|
when 'remote'
|
||||||
CustomEmoji.remote
|
CustomEmoji.remote
|
||||||
when 'by_domain'
|
when 'by_domain'
|
||||||
|
Loading…
Reference in New Issue
Block a user