Forum: Ruby on Rails Double Render Error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Lindsay B. (Guest)
on 2006-02-24 20:44
Is there a way to suppress the Double Render Error:

"ActionController::DoubleRenderError.
Render and/or redirect were called multiple times in this action. Please
note that you may only call render OR redirect, and only once per
action."

Ideally, I would like the last redirect/render called to be the one that
is actually used when the page is sent to the browser.
Dave S. (Guest)
on 2006-02-24 20:56
(Received via mailing list)
On Friday 24 Feb 2006 18:44, Lindsay B. wrote:
> Ideally, I would like the last redirect/render called to be the one that
> is actually used when the page is sent to the browser.

Just put a "return" statement straight after them, and your problems
will
vanish.  ;-)

See: http://jamis.jamisbuck.org/articles/2005/07/08/rai...

~Dave

--

Dave S.
Rent-A-Monkey Website Development
http://www.rentamonkey.com/

PGP Key: http://www.rentamonkey.com/pgpkey.asc
Lindsay B. (Guest)
on 2006-02-24 21:02
Thanks! The tip-of-the-day  makes a lot of sense!
This topic is locked and can not be replied to.