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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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