lib/inline_svg/railtie.rb in inline_svg-1.5.1 vs lib/inline_svg/railtie.rb in inline_svg-1.5.2
- old
+ new
@@ -12,22 +12,12 @@
InlineSvg.configure do |config|
# Configure the asset_finder:
# Only set this when a user-configured asset finder has not been
# configured already.
if config.asset_finder.nil?
- if assets = app.instance_variable_get(:@assets)
- # In default Rails apps, this will be a fully operational
- # Sprockets::Environment instance
- config.asset_finder = assets
- elsif defined?(Webpacker)
- # Use Webpacker when it's available
- config.asset_finder = InlineSvg::WebpackAssetFinder
- else
- # Fallback to the StaticAssetFinder if all else fails.
- # This will be used in cases where assets are precompiled and other
- # production settings.
- config.asset_finder = InlineSvg::StaticAssetFinder
- end
+ # In default Rails apps, this will be a fully operational
+ # Sprockets::Environment instance
+ config.asset_finder = app.instance_variable_get(:@assets)
end
end
end
end
end