试卷题的验证

dev_new_shixunsrepository
cxt 5 years ago
parent d96bdc8751
commit e593c0d05e

@ -66,7 +66,7 @@ class ExerciseAnswersController < ApplicationController
} }
ea_answer = ea.search_answer_users("exercise_choice_id",choice_id) ea_answer = ea.search_answer_users("exercise_choice_id",choice_id)
if ea.present? && ea_answer.present? if ea.present? && ea_answer.present?
ea_answer.update(answer_option) ea_answer.update!(answer_option)
else else
ex_new = ExerciseAnswer.new(answer_option) ex_new = ExerciseAnswer.new(answer_option)
ex_new.save! ex_new.save!

Loading…
Cancel
Save