mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 18:30:26 -06:00
DEV: Add useful error message for hbs register_asset (#19185)
This hasn't been necessary for many years, and is no longer supported following 84bec1cb
. Only extremely old plugins might be trying to do this. All the affected open-source plugins I can find have already been updated.
This commit is contained in:
parent
c4fdc48164
commit
abe2813789
@ -586,6 +586,13 @@ class Plugin::Instance
|
||||
end
|
||||
|
||||
def register_asset(file, opts = nil)
|
||||
if file.end_with?(".hbs", ".handlebars")
|
||||
raise <<~ERROR
|
||||
[#{name}] Handlebars templates can no longer be included via `register_asset`.
|
||||
Any hbs files under `assets/javascripts` will be automatically compiled and included."
|
||||
ERROR
|
||||
end
|
||||
|
||||
if opts && opts == :vendored_core_pretty_text
|
||||
full_path = DiscoursePluginRegistry.core_asset_for_name(file)
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user