From cdecd67becfd41998ceaa479077739715ade2619 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Thu, 19 Dec 2024 11:38:37 +0100 Subject: [PATCH] Make sure it adds the javascripts path to the assets path Fix https://github.com/basecamp/hotwire-spark/issues/16 --- lib/hotwire/spark/engine.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/hotwire/spark/engine.rb b/lib/hotwire/spark/engine.rb index 677c3a9e..1a93e75d 100644 --- a/lib/hotwire/spark/engine.rb +++ b/lib/hotwire/spark/engine.rb @@ -12,6 +12,10 @@ class Engine < ::Rails::Engine html_paths: %w[ app/controllers app/helpers app/models app/views ], stimulus_paths: %w[ app/javascript/controllers ] + initializer "mission_control-jobs.assets" do |app| + app.config.assets.paths << root.join("app/assets/javascripts") + end + initializer "hotwire_spark.config" do |app| config.hotwire.spark.each do |key, value| Hotwire::Spark.send("#{key}=", value)