class YDIM::Html::View::Pdf

Public Instance Methods

http_headers(*args) click to toggle source
Calls superclass method
# File lib/ydim/html/view/pdf.rb, line 15
def http_headers(*args)
        super.update(
                'Content-Type'                               => 'application/pdf',
                'Content-Disposition' =>  "attachment; filename=#{@model.unique_id}.pdf"
        )
end
to_html(context) click to toggle source
# File lib/ydim/html/view/pdf.rb, line 11
def to_html(context)
  @model.to_pdf :sortby => (@session.state.sortby || []).first,
                :sort_reverse => @session.state.sort_reverse
end