mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +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:
parent
7d857d79bd
commit
d4717f5d1e
4 changed files with 43 additions and 159 deletions
|
@ -456,7 +456,6 @@ class Plugin::Instance
|
|||
end
|
||||
|
||||
def register_custom_html(hash)
|
||||
DiscoursePluginRegistry.custom_html ||= {}
|
||||
DiscoursePluginRegistry.custom_html.merge!(hash)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue