diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index fdd55e6cf..265398833 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -206,7 +206,7 @@ class ShixunsController < ApplicationController # 同步参考答案 challenge.challenge_answers.each do |answer| new_answer = ChallengeAnswer.new - new_answer = new_answer.attributes.dup.except("id","challenge_id") + new_answer = answer.attributes.dup.except("id","challenge_id") new_answer.challenge_id = new_challenge.id new_answer.save! end