mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 19:53:53 -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
|
class Admin::PluginsController < Admin::StaffController
|
||||||
def index
|
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
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user