RailsCasts Pro episodes are now free!

Learn more or hide this

Jon Waghorn's Profile

GitHub User: jonwaghorn

Comments by Jon Waghorn

Avatar

I did this recently. On first create rendered the pdf to webserver's filesystem (/public/generated_docs or similar). In future check for existence of the generated file and render a link to it rather than a link to generate the pdf.

If you don't have too many pdfs then you could pre-render all of them. Depends on your web app if this is suitable or not.