mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 02:19:27 +08:00
FIX: Make user themes sort order case insensitive (#15193)
That's the order they appear in a dropdown in user preferences.
This commit is contained in:
parent
3b13f1146b
commit
4bb91754ad
|
@ -42,7 +42,7 @@ class SiteSerializer < ApplicationSerializer
|
|||
cache_fragment("user_themes") do
|
||||
Theme.where('id = :default OR user_selectable',
|
||||
default: SiteSetting.default_theme_id)
|
||||
.order(:name)
|
||||
.order("lower(name)")
|
||||
.pluck(:id, :name, :color_scheme_id)
|
||||
.map { |id, n, cs| { theme_id: id, name: n, default: id == SiteSetting.default_theme_id, color_scheme_id: cs } }
|
||||
.as_json
|
||||
|
|
Loading…
Reference in New Issue
Block a user