打印日志

dev_forum
daiao 5 years ago
parent ce2344eecd
commit c3885ec64c

@ -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

Loading…
Cancel
Save