ruby on rails - prawn pdf rendering partial results in blank page -
i try use rails prawn template style. in main prawn document "order_summary", want render prawn template this:
pdf = prawn::document.new(:page_size => "a4") render :partial => "invoice"
the name of partial is: _invoice.pdf.prawn , resides in same folder main document.
when running it, results in blank page. page rendered according logs:
rendered documents/_invoice.pdf.prawn (756.7ms) rendered documents/order_summary.pdf.prawn (1100.9ms) completed 200 ok in 2323ms (views: 1141.1ms | activerecord: 0.4ms)
if run partial "invoice.pdf.prawn" (without rendering through file), works fine assume there no code error or sth.
what do wrong?
this gotcha documented in prawnto wiki. if partial in same folder, still have specify full path. in case, 'documents/invoice'.
Comments
Post a Comment