|
|
@ -57,7 +57,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.first.update!(answer_option)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
ex_new = ExerciseAnswer.new(answer_option)
|
|
|
|
ex_new = ExerciseAnswer.new(answer_option)
|
|
|
|
ex_new.save!
|
|
|
|
ex_new.save!
|
|
|
|