From 1df918652631473449620a4a1cc222b1d93c9c64 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Fri, 2 Feb 2024 19:06:16 +0000 Subject: [PATCH] FIX: Plugin image assets in production (#25547) Followup to 1757a688c4749968db8e27623b975fc57519b97a --- lib/plugin/instance.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/plugin/instance.rb b/lib/plugin/instance.rb index 3513f64a5cb..e9f8190331e 100644 --- a/lib/plugin/instance.rb +++ b/lib/plugin/instance.rb @@ -735,6 +735,9 @@ class Plugin::Instance seed_data.each { |key, value| DiscoursePluginRegistry.register_seed_data(key, value) } + # Allow plugins to `register_asset` for images under /assets + Rails.configuration.assets.paths << File.dirname(path) + "/assets" + # Automatically include rake tasks Rake.add_rakelib(File.dirname(path) + "/lib/tasks")