[Rails] Re: double render problem
On Jun 6, 8:10 pm, Bob Smith <bsm...@gmail.com> 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 I remember right, there
> was a method that acted almost like redirect_to, but wouldn't cause
> the error. Please help...
>
I don't think you do - there can only be a single response to an http
request, so you can't both provide a file and show a response (unless
perhaps you were to do something like have your "success" page include
an iframe with the actual download)
Fred
Fred
> Thanks
>
> Bob
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home