Hi to everyone,
In my Rails experimenting, I’ve come to a point where in the application
happens what follows.
- Upon selecting some stuff on a page, the user click on a button.
- 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
created.
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
page.
Thanks in advance for your help.
Regards,
Carmine