From 4e1edf4a742f7731237806338d5993f4854dea53 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 25 Dec 2019 11:41:00 +0800 Subject: [PATCH 1/3] Fork --- 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 940955e93..bda0df5dd 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -216,7 +216,7 @@ class ShixunsController < ApplicationController ShixunInfo.create!(shixun_id: @new_shixun.id, description: @shixun.description, evaluate_script: @shixun.evaluate_script, - shixun_reason: params[:reason].to_s.strip) + fork_reason: params[:reason].to_s.strip) end # 同步私密版本库 From 82d8c2f4b1d8105813527bf2fc46b2cf5aa95a9b Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 25 Dec 2019 11:52:29 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=85=AC=E5=BC=80=E6=88=96=E7=A7=81?= =?UTF-8?q?=E6=9C=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20191225035117_modify_open_or_not_for_hacks.rb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 db/migrate/20191225035117_modify_open_or_not_for_hacks.rb diff --git a/db/migrate/20191225035117_modify_open_or_not_for_hacks.rb b/db/migrate/20191225035117_modify_open_or_not_for_hacks.rb new file mode 100644 index 000000000..6b67d2dfd --- /dev/null +++ b/db/migrate/20191225035117_modify_open_or_not_for_hacks.rb @@ -0,0 +1,5 @@ +class ModifyOpenOrNotForHacks < ActiveRecord::Migration[5.2] + def change + change_column :hacks, :open_or_not, :boolean, :default => false + end +end From 38ff27c4aa0d28acec3b5ac69481a0c501fbc970 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 25 Dec 2019 11:55:11 +0800 Subject: [PATCH 3/3] 1 --- app/models/hack.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/hack.rb b/app/models/hack.rb index 915ff6f9e..e1b2b225e 100644 --- a/app/models/hack.rb +++ b/app/models/hack.rb @@ -56,7 +56,7 @@ class Hack < ApplicationRecord private def send_delete_tiding base_attrs = { - user_id: user_id, viewed: 0, tiding_type: 'System', trigger_user_id: current_user.id, + user_id: user_id, viewed: 0, tiding_type: 'System', trigger_user_id: User.current.id, parent_container_type: "HackDelete" } tidings.create!(base_attrs)