From 254b35935674e46b5ead21914e3cbc0009cb7a53 Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Sat, 22 Jun 2019 18:25:49 +0800 Subject: [PATCH] fix bug --- app/controllers/exercise_answers_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/exercise_answers_controller.rb b/app/controllers/exercise_answers_controller.rb index fec26d674..df6550c0d 100644 --- a/app/controllers/exercise_answers_controller.rb +++ b/app/controllers/exercise_answers_controller.rb @@ -94,7 +94,7 @@ class ExerciseAnswersController < ApplicationController def get_exercise_question @exercise_question = ExerciseQuestion.find_by_id(params[:exercise_question_id]) - @exercise = @exercise_question.exercise.includes(:exercise_users) + @exercise = @exercise_question.exercise @course = @exercise.course @exercise_user = @exercise.exercise_users.find_by(user_id: current_user.id) #当前用户 @exercise_user_status = @exercise.get_exercise_status(current_user.id)