Response.End / Exit equivalent in Ruby?

Discussion in 'Ruby' started by Sy Ys, May 27, 2007.

  1. Sy Ys

    Sy Ys Guest

    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

    --
    Posted via http://www.ruby-forum.com/.
    Sy Ys, May 27, 2007
    #1
    1. Advertising

  2. On 5/27/07, Sy Ys <> 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
    --
    Austin Ziegler * * http://www.halostatue.ca/
    * * http://www.halostatue.ca/feed/
    *
    Austin Ziegler, May 27, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. csgraham74

    Response.Redirect at a response.end

    csgraham74, Jun 16, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    862
    Karl Seguin
    Jun 16, 2005
  2. =?Utf-8?B?U2FuZHk=?=

    Code to Exit Web App and Exit Internet Explorer

    =?Utf-8?B?U2FuZHk=?=, Aug 3, 2005, in forum: ASP .Net
    Replies:
    7
    Views:
    7,880
    =?Utf-8?B?U2FuZHk=?=
    Aug 5, 2005
  3. Replies:
    9
    Views:
    4,719
  4. Joe Smith
    Replies:
    4
    Views:
    65,795
    sandeep1976
    Nov 8, 2006
  5. Replies:
    2
    Views:
    444
    Jeff Epler
    May 31, 2005
Loading...

Share This Page