Response.End / Exit equivalent in Ruby?

S

Sy Ys

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
 
A

Austin Ziegler

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top