Question closing page after action

Hi all,

does anyone know of a rails command i can use so that at the end of an
action, the page will close at termination? (i.e it would be the
equivalent of a javascript and would
look something like this

def create
@contact = Contact.new(params[:contact])
if @contact.save
:action => :closewindow ## or something like this? ##
else
render_text ‘you have failed…’
end
end

thanks in advance,

s

You could use RJS to update an element with the enclosed javascript.
The browser should execute the javascript (I’ve done this with
redirection on remote forms on http://heartbeat.highgroove.com).

  • Derek

On 6/23/06, shai [email protected] wrote:

:action => :closewindow     ## or something like this? ##


Posted via http://www.ruby-forum.com/.


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Derek H.
HighGroove Studios - http://www.highgroove.com
San Mateo, CA | Atlanta, GA
Keeping it Simple.
650.276.0908