Skip to content

Commit bdd0ca3

Browse files
authored
Merge pull request #968 from cprodhomme/patch-1
Update README.md
2 parents b427b37 + eac4a26 commit bdd0ca3

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

README.md

+9-10
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,9 @@ Using wicked_pdf_helpers with asset pipeline raises `Asset names passed to helpe
112112

113113
wicked_pdf supports webpack assets.
114114

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")`
119118

120119
#### Asset pipeline usage
121120

@@ -127,11 +126,11 @@ It is best to precompile assets used in PDF views. This will help avoid issues w
127126

128127
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.
129128
```html
130-
<!doctype html>
131-
<html>
132-
<head>
133-
<%= javascript_include_tag "http://code.jquery.com/jquery-1.10.0.min.js" %>
134-
<%= javascript_include_tag "http://code.jquery.com/ui/1.10.3/jquery-ui.min.js" %>
129+
<!doctype html>
130+
<html>
131+
<head>
132+
<%= javascript_include_tag "http://code.jquery.com/jquery-1.10.0.min.js" %>
133+
<%= javascript_include_tag "http://code.jquery.com/ui/1.10.3/jquery-ui.min.js" %>
135134
```
136135

137136
### Advanced Usage with all available options
@@ -458,7 +457,7 @@ http://localhost:3001/CONTROLLER/X.pdf?debug
458457

459458
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:
460459
```html
461-
<%= params.key?('debug') ? image_tag('foo') : wicked_pdf_image_tag('foo') %>
460+
<%= params.key?('debug') ? image_tag('foo') : wicked_pdf_image_tag('foo') %>
462461
```
463462

464463
#### Gotchas

0 commit comments

Comments
 (0)