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
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).