I am using Rails 2.3.5 and in that if I give Model.find(1) and if 1 is not in the database, it returns ActiveRecord error. Should it just be returning nil
Model.find(1)
nil
Rails 4 Method
if user = User.find_by(id: params[:id]) #do something with user else #throw error or redirect raise ActiveRecord::RecordNotFound end