We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5848f32 + eb0469e commit a079db1Copy full SHA for a079db1
lib/js_image_paths/engine.rb
@@ -4,7 +4,8 @@ class Engine < Rails::Engine
4
isolate_namespace(JsImagePaths)
5
6
initializer('js_image_paths.compile', after: 'sprockets.environment') do |application|
7
- application.assets.register_preprocessor('application/javascript', :'js_image_path.compile') do |context, data|
+ sprockets_env = application.assets || Sprockets
8
+ sprockets_env.register_preprocessor('application/javascript', :'js_image_path.compile') do |context, data|
9
if context.logical_path == 'js_image_paths'
10
JsImagePaths::Generator.context = context
11
end
0 commit comments