Sha256: f01234db479f8f3201b2c5aec55f67847f05d108b3ea5a94885293405f5928a9
Contents?: true
Size: 546 Bytes
Versions: 3
Compression:
Stored size: 546 Bytes
Contents
#!/usr/bin/env ruby # encoding: utf-8 # Html::View::Pdf -- ydim -- 17.01.2006 -- hwyss@ywesee.com require 'htmlgrid/component' module YDIM module Html module View class Pdf < HtmlGrid::Component def to_html(context) @model.to_pdf :sortby => (@session.state.sortby || []).first, :sort_reverse => @session.state.sort_reverse end def http_headers(*args) super.update( 'Content-Type' => 'application/pdf', 'Content-Disposition' => "attachment; filename=#{@model.unique_id}.pdf" ) end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ydim-html-1.0.3 | lib/ydim/html/view/pdf.rb |
ydim-html-1.0.2 | lib/ydim/html/view/pdf.rb |
ydim-html-1.0.1 | lib/ydim/html/view/pdf.rb |