How to force redirection after a render on PDF::Writer?

Hi to everyone,

In my Rails experimenting, I’ve come to a point where in the application
happens what follows.

  1. Upon selecting some stuff on a page, the user click on a button.
  2. After clicking I need to:
    2.1 Produce a PDF with some “Pretty Useful Information™”
    2.2 Bring the user to another page

The PDF being produced with PDF::Writer requires a “render” call in
order to be
So if I place a “redirect_to” soon after the PDF creation, Rails
complains saying that only one “render” or “redirect” is allowed.

How can I overcome this? I don’t want the user to click multiple times
on the
same button or forcing him/her to click somewhere else in order to
change the

Thanks in advance for your help.

Would render_to_string work for you? (