Class: Dorsale::ApplicationPdf

Inherits:
Prawn::Document
  • Object
show all
Includes:
Dorsale::Alexandrie::Prawn::RenderWithAttachments, PrawnHelpers
Defined in:
app/pdfs/dorsale/application_pdf.rb

Direct Known Subclasses

ExpenseGun::ExpensePdf

Instance Method Summary collapse

Methods included from PrawnHelpers

#bb, #btb, #draw_debug_bounds!, #draw_debug_bounds?, #get_image, #page_height, #page_width, #placeholder, #t, #tb

Methods included from UsersHelper

#avatar_img, #default_avatar_url

Methods included from ExpenseGun::ApplicationHelper

#expense_states_for_filters_select

Methods included from BillingMachine::ApplicationHelper

#billing_machine_invoices_chart, #billing_machine_payment_status_for_filter_select, #billing_machine_quotation_states_for_filter_select, #billing_machine_quotation_states_for_select, #bm_currency, #quotation_state_classes

Methods included from ContextHelper

#actions_for, #render_dorsale_page

Instance Method Details

#open!Object

Pour le dev



10
11
12
13
14
15
16
# File 'app/pdfs/dorsale/application_pdf.rb', line 10

def open!
  build
  f = Tempfile.new(%w(pdf pdf))
  f.binmode
  f.write(render_with_attachments)
  Launchy.open(f.path)
end