mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:31:35 +08:00
DEV: Reduce repeated code in discourse_plugin_registry (#9705)
Use a helper method to simplify creating a new register. Previously this would require creating lots of different methods manually, and adding every register to the clear/reset functions
This commit is contained in:
@ -456,7 +456,6 @@ class Plugin::Instance
|
||||
end
|
||||
|
||||
def register_custom_html(hash)
|
||||
DiscoursePluginRegistry.custom_html ||= {}
|
||||
DiscoursePluginRegistry.custom_html.merge!(hash)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user