wicked_pdf icon indicating copy to clipboard operation
wicked_pdf copied to clipboard

Allow/Fix precompiled assets with Propshaft pipeline

Open serggl opened this issue 8 months ago • 2 comments

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

serggl avatar Jun 11 '24 10:06 serggl