change in surveys_controller.rb to find_by(user_id: session[user_id])