From 04dc476b8854cd3f03178017f030e4c099c37296 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 3 Jul 2019 11:02:45 +0800 Subject: [PATCH] =?UTF-8?q?copy=E5=8F=82=E8=80=83=E7=AD=94=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/shixuns_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 265398833..fdd55e6cf 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 = answer.attributes.dup.except("id","challenge_id") + new_answer = new_answer.attributes.dup.except("id","challenge_id") new_answer.challenge_id = new_challenge.id new_answer.save! end