Couldn't find User with ID=1

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:

Danny is correct as well, both will work depending on what you are
trying to do. I had forgotten that find_by_* dynamic finders returned
nil.

William Pratt wrote: