wicked_pdf
wicked_pdf copied to clipboard
Allow/Fix precompiled assets with Propshaft pipeline
Purpose
rails/propshaft support was added with #1010 However it appears to only work with dynamic assets and fails with precompiled ones:
#<UncaughtThrowError: uncaught throw #<ActionView::Template::Error: undefined local variable or method `content' for an instance of WickedPdf::WickedPdfHelper::Assets::PropshaftAsset>>
Solution
Improve the original solution and use Propshaft's built-in resolver to handle gracefully both asset types