Forum: Ruby Response.End / Exit equivalent in Ruby?

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.
Sy Y. (Guest)
on 2007-05-27 18:41
If the user types in junk, I'd like to return the user to the original
page.

Can't seem to do it. How is this typically handled?



def getBody url
        begin
                open(url) do |file|
                        @body = file.read
                end
        rescue SystemCallError
                flash[:notice] = 'Check failed. This may be a bug but
its probably just your fault.'
                render :action => 'new'
                ###STOP THE BOAT HERE!!!!
        end
end
Austin Z. (Guest)
on 2007-05-27 20:10
(Received via mailing list)
On 5/27/07, Sy Ys <removed_email_address@domain.invalid> wrote:
> If the user types in junk, I'd like to return the user to the original
> page.
>
> Can't seem to do it. How is this typically handled?

This seems like a Rails question. You may want to ask on a Rails forum
instead.

-austin
This topic is locked and can not be replied to.