If the user types in junk, I’d like to return the user to the original
Can’t seem to do it. How is this typically handled?
def getBody url
open(url) do |file| @body = file.read
flash[:notice] = ‘Check failed. This may be a bug but
its probably just your fault.’
render :action => ‘new’
###STOP THE BOAT HERE!!!
it seems getBody() is a helper ? i’d catch the exeption in the
controller action, redirect or render the page you want. notice that
you can’t call render more than once, but you can call return after
the render call:
render :action=>:one and return if params[:id].to_i > 10
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.