Possible to construct Prawn::Document inside another Prawn::Document

9 views
Skip to first unread message

yogi

unread,
Jan 26, 2012, 3:36:41 PM1/26/12
to Prawn
I have two sub classes of Prawn::Document, InvoiceDocument and
GroupedInvoiceDocument. As the names implies the latter is sort of
index of multiple associated regular invoices. What I want to do is
that I could attach all the invoice pdf's inside the
GroupedInvoiceDocument. Is it possible somehow to have something like
below in my GroupedInvoiceDocument?

def attach_invoices
@grouped_invoice.invoices.each do |invoice|
start_new_page
InvoiceDocument.new(invoice)
end
end


cheers,
yogi
Reply all
Reply to author
Forward
0 new messages