From b7fcd7d991c6bac05d2e0916f905938ee5209f77 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 25 Sep 2019 10:41:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/welcome_controller.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index 158f6512..c7534423 100755 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -69,7 +69,7 @@ class WelcomeController < ApplicationController new_stage_shixun = LocalStageShixun.new new_stage_shixun.attributes = stage_shixun.attributes.dup.except("id") new_stage_shixun.local_subject_id = local_subject.id - new_stage_shixun.local_subject_id = new_stage.id + new_stage_shixun.local_stage_id = new_stage.id new_stage_shixun.save! end end @@ -115,7 +115,9 @@ class WelcomeController < ApplicationController local_stage_shixuns.each do |local_stage_shixun| # 先同步实训 local_shixun = LocalShixun.where(id: local_stage_shixun.local_shixun_id).first - shixun = _local_to_shixun local_shixun if local_shixun.present? + shixun = _local_to_shixun(local_shixun) if local_shixun.present? + puts("#############local_shixun_id#{local_shixun.id}") + puts("#############shixun_id#{shixun.id}") new_stage_shixun = StageShixun.new new_stage_shixun.position = local_stage_shixun.position