Yep, just rescue from the exception if it occurs like this
`begin
@m = Model.find(id)
rescue ActiveRecord::RecordNotFound
#do something here if you want to
end
`
if @m
#do stuff with @m
else
#do stuff without @m
end
Hope this helps ya.
David Modernfossil wrote: