Help with pdf template handler that supports layouts

Plugins such as prawnto and prawn-rails don’t support layouts (eg.
application.pdf.prawn), and I thought I’d try writing a prawn template
handler that does (or helping those projects support it).

Currently my attempt is failing b/c rails renders the template (eg.
show.pdf.prawn) before the layout. I know this is the default
implementation, that the result of rendering the view gets yielded to
the layout, but is this necessarily so? I could hazily imagine a world
in which the layout is called like ‘normal’ ruby, and the template is
evaluated once it hits the yield… I thought this had to do
with streaming support, but enabling it didn’t make it render in-order
like I thought it might.

Is this do-able, or am I missing something?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs