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
46 47 48 |
# File 'lib/wicked_pdf_helper.rb', line 46 def wicked_pdf_image_tag(img, ={}) image_tag "file://#{asset_pathname(img).to_s}", end |
#wicked_pdf_javascript_include_tag(*sources) ⇒ Object
54 55 56 57 58 |
# File 'lib/wicked_pdf_helper.rb', line 54 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
50 51 52 |
# File 'lib/wicked_pdf_helper.rb', line 50 def wicked_pdf_javascript_src_tag(jsfile, ={}) javascript_include_tag "file://#{asset_pathname(jsfile).to_s}", end |
#wicked_pdf_stylesheet_link_tag(*sources) ⇒ Object
40 41 42 43 44 |
# File 'lib/wicked_pdf_helper.rb', line 40 def wicked_pdf_stylesheet_link_tag(*sources) sources.collect { |source| "<style type='text/css'>#{read_asset(source+".css")}</style>" }.join("\n").html_safe end |