[Rails] Re: double render problem

2011-06-06 Thread Bob Smith
The reason for the redirect_to is to end the process after the file is created at the index page so the user doesn't have to find his way back. Is there a way to go to the start or index page maybe? Bob On Jun 7, 12:03 am, radhames brito wrote: > On Mon, Jun 6, 2011 at 3:41 PM, Bob Smith wrote:

Re: [Rails] Re: double render problem

2011-06-06 Thread radhames brito
On Mon, Jun 6, 2011 at 3:41 PM, Bob Smith wrote: > When I render the report, it's to a file that can be viewed, printed, > or backed up as needed. It is to a pdf, so I'm using: > > That i understand , you can render the file inline or send it to the user, what i dont understand is the need to re

[Rails] Re: double render problem

2011-06-06 Thread Frederick Cheung
On Jun 6, 8:10 pm, Bob Smith wrote: > I'm trying to print a report as a pdf, which uses the render method. > This works fine. The problem comes at the end when I try to redirect > to the index page, which causes the double render. I'm sure there's a > way around this, but I'm coming up blank. If

[Rails] Re: double render problem

2011-06-06 Thread Bob Smith
When I render the report, it's to a file that can be viewed, printed, or backed up as needed. It is to a pdf, so I'm using: respond_to do |format| format.pdf { send_data render_to_pdf( :action => 'idreport', :layout => 'pdf_report')