|
|
|
@ -177,7 +177,7 @@ class Subjects::CopySubjectService < ApplicationService
|
|
|
|
|
def copy_challenge_questions_data!(challenge_choose, to_challenge_choose)
|
|
|
|
|
challenge_choose.challenge_questions.each do |challenge_question|
|
|
|
|
|
to_challenge_question = to_challenge_choose.challenge_questions.new
|
|
|
|
|
to_challenge_question.attributes = challenge_question.attributes.dup.except('id,', 'challenge_choose_id')
|
|
|
|
|
to_challenge_question.attributes = challenge_question.attributes.dup.except('id', 'challenge_choose_id')
|
|
|
|
|
to_challenge_question.challenge_choose_id = to_challenge_choose.id
|
|
|
|
|
to_challenge_question.save!
|
|
|
|
|
end
|
|
|
|
|