Sha256: 2dcce21e9220e7eee35c53385c12faa6beea488b2630a8969388d199c660815d
Contents?: true
Size: 706 Bytes
Versions: 2
Compression:
Stored size: 706 Bytes
Contents
module WickedPdfHelper def wicked_pdf_stylesheet_link_tag(*sources) css_dir = Rails.root.join('public','stylesheets') sources.collect { |source| "<style type='text/css'>#{File.read(css_dir.join(source+'.css'))}</style>" }.join("\n").html_safe end def wicked_pdf_image_tag(img, options={}) image_tag "file://#{Rails.root.join('public', 'images', img)}", options end def wicked_pdf_javascript_src_tag(jsfile, options={}) javascript_src_tag "file://#{Rails.root.join('public','javascripts',jsfile)}", options end def wicked_pdf_javascript_include_tag(*sources) sources.collect{ |source| wicked_pdf_javascript_src_tag(source, {}) }.join("\n").html_safe end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
wicked_pdf-0.7.2 | lib/wicked_pdf_helper.rb |
wicked_pdf-0.7.0 | lib/wicked_pdf_helper.rb |