Module: WickedPdfHelper::Assets
- Defined in:
- lib/wicked_pdf_helper.rb
Instance Method Summary collapse
- #wicked_pdf_image_tag(img, options = {}) ⇒ Object
- #wicked_pdf_javascript_include_tag(*sources) ⇒ Object
- #wicked_pdf_javascript_src_tag(jsfile, options = {}) ⇒ Object
- #wicked_pdf_stylesheet_link_tag(*sources) ⇒ Object
Instance Method Details
#wicked_pdf_image_tag(img, options = {}) ⇒ Object
34 35 36 |
# File 'lib/wicked_pdf_helper.rb', line 34 def wicked_pdf_image_tag(img, ={}) image_tag "file:///#{asset_pathname(img).to_s}", end |
#wicked_pdf_javascript_include_tag(*sources) ⇒ Object
42 43 44 45 46 |
# File 'lib/wicked_pdf_helper.rb', line 42 def wicked_pdf_javascript_include_tag(*sources) sources.collect { |source| "<script type='text/javascript'>#{read_asset(source+".js")}</script>" }.join("\n").html_safe end |
#wicked_pdf_javascript_src_tag(jsfile, options = {}) ⇒ Object
38 39 40 |
# File 'lib/wicked_pdf_helper.rb', line 38 def wicked_pdf_javascript_src_tag(jsfile, ={}) javascript_include_tag "file:///#{asset_pathname(jsfile).to_s}", end |
#wicked_pdf_stylesheet_link_tag(*sources) ⇒ Object
28 29 30 31 32 |
# File 'lib/wicked_pdf_helper.rb', line 28 def wicked_pdf_stylesheet_link_tag(*sources) sources.collect { |source| "<style type='text/css'>#{read_asset(source+".css")}</style>" }.join("\n").html_safe end |