Yes, this line ('@user = User.students.find params[:id]') should do totally fine here, since a ActiveRecord::RecordNotFound will also result in a 404 page when in production mode.