From c3885ec64c6f9982452c8b1ca0deba763135a889 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 2 Jul 2019 11:43:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/shixuns_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 0d913a0a1..767129026 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -280,7 +280,6 @@ class ShixunsController < ApplicationController @small_type = shixun_small_type end - # 注意这里传参都应该使用params[:shixun]['name']这种格式 def create # 评测脚本的一些操作 main_type, sub_type = params[:main_type], params[:small_type] @@ -388,7 +387,8 @@ class ShixunsController < ApplicationController ShixunMirrorRepository.create(:shixun_id => @shixun.id, :mirror_repository_id => mirror) end end - + logger.info("#######shixun_params: ##{shixun_params}") + logger.info("#######shixun_info_params: ##{shixun_info_params}") @shixun.update_attributes(shixun_params) @shixun.shixun_info.update_attributes(shixun_info_params) @shixun.shixun_schools.delete_all @@ -735,7 +735,7 @@ private def shixun_params raise("实训名称不能为空") if params[:shixun][:name].blank? params.require(:shixun).permit(:name, :trainee, :webssh, :can_copy, :use_scope, :vnc, :test_set_permission, - :task_pass, :repo_name, :multi_webssh, :opening_time, :mirror_script_id, :code_hidden, + :task_pass, :multi_webssh, :opening_time, :mirror_script_id, :code_hidden, :hide_code, :forbid_copy) end def shixun_info_params