You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+9-10
Original file line number
Diff line number
Diff line change
@@ -112,10 +112,9 @@ Using wicked_pdf_helpers with asset pipeline raises `Asset names passed to helpe
112
112
113
113
wicked_pdf supports webpack assets.
114
114
115
-
Use `wicked_pdf_stylesheet_pack_tag` for stylesheets
116
-
Use `wicked_pdf_javascript_pack_tag` for javascripts
117
-
118
-
Use `wicked_pdf_asset_pack_path` to access an asset directly, for example: `image_tag wicked_pdf_asset_pack_path("media/images/foobar.png")`
115
+
- Use `wicked_pdf_stylesheet_pack_tag` for stylesheets
116
+
- Use `wicked_pdf_javascript_pack_tag` for javascripts
117
+
- Use `wicked_pdf_asset_pack_path` to access an asset directly, for example: `image_tag wicked_pdf_asset_pack_path("media/images/foobar.png")`
119
118
120
119
#### Asset pipeline usage
121
120
@@ -127,11 +126,11 @@ It is best to precompile assets used in PDF views. This will help avoid issues w
127
126
128
127
In this case, you can use that standard Rails helpers and point to the current CDN for whichever framework you are using. For jQuery, it would look somethng like this, given the current versions at the time of this writing.
However, the wicked_pdf_* helpers will use file:/// paths for assets when using :show_as_html, and your browser's cross-domain safety feature will kick in, and not render them. To get around this, you can load your assets like so in your templates:
0 commit comments