Module: Saucerly::Render
- Defined in:
- lib/saucerly.rb
Instance Method Summary collapse
Instance Method Details
#render_pdf(pdf_name, options = {}) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/saucerly.rb', line 10 def render_pdf(pdf_name, = {}) = {:filename => pdf_name + ".pdf", :type => 'application/pdf'} .merge!(.slice(:disposition)) html_string = render_to_string() send_data(Saucerly::Pdf.new(html_string).to_pdf, ) end |