mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 02:11:08 -06:00
FIX: Sort plugin list by name properly (#24839)
Some plugins have discourse- prefixed on their name and some don't, so sorting in the list was inconsistent. --------- Co-authored-by: Ted Johansson <ted@discourse.org>
This commit is contained in:
parent
a390dc0360
commit
194c84b217
@ -2,6 +2,10 @@
|
||||
|
||||
class Admin::PluginsController < Admin::StaffController
|
||||
def index
|
||||
render_serialized(Discourse.visible_plugins, AdminPluginSerializer, root: "plugins")
|
||||
render_serialized(
|
||||
Discourse.visible_plugins.sort_by { |p| p.name.downcase.delete_prefix("discourse-") },
|
||||
AdminPluginSerializer,
|
||||
root: "plugins",
|
||||
)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user