Carmine Moleti
2006-Jun-30 13:21 UTC
[Rails] 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(TM)" 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 -- Posted via http://www.ruby-forum.com/.