From 17e619fc3ef7b01dbd01eb35be0401b74bc36cf8 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 2 Jan 2020 15:50:27 +0800 Subject: [PATCH] 1 --- app/controllers/hacks_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/hacks_controller.rb b/app/controllers/hacks_controller.rb index 0db36556b..f19ef0cea 100644 --- a/app/controllers/hacks_controller.rb +++ b/app/controllers/hacks_controller.rb @@ -61,7 +61,8 @@ class HacksController < ApplicationController hack_codes = hack.hack_codes.new(hack_code_params) hack_codes.modify_time = Time.now hack_codes.save! - new_item_params = item_params.merge({container: hack, item_type: 'PROGRAM', difficulty: params[:hack][:difficult], user_id: current_user.id}) + logger.info("#############hack_codes:#{hack_codes.id}") + new_item_params = item_params.merge(container: hack, item_type: 'PROGRAM', difficulty: params[:hack][:difficult], user_id: current_user.id) ItemBank.create!(new_item_params) end render_ok({identifier: hack.identifier})