From 30006461a693e920b13d9d775cc2e0726501bf03 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 24 Feb 2020 11:27:27 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20200223021427_sync_subjectds_mobile.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20200223021427_sync_subjectds_mobile.rb b/db/migrate/20200223021427_sync_subjectds_mobile.rb index 0aa20aea4..72b4ee18e 100644 --- a/db/migrate/20200223021427_sync_subjectds_mobile.rb +++ b/db/migrate/20200223021427_sync_subjectds_mobile.rb @@ -1,7 +1,7 @@ class SyncSubjectdsMobile < ActiveRecord::Migration[5.2] def change SubDisciplineContainer.where(container_type: "Subject").find_each do |sc| - Subject.find(sc.container_id).update_column(:show_mobile => true) + Subject.find(sc.container_id).update_column("show_mobile", true) end end end From d0f21d735049b0701e79cb1ddf84e29e6b0db4af Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 24 Feb 2020 11:35:08 +0800 Subject: [PATCH 2/2] =?UTF-8?q?Oj=E5=85=B3=E8=81=94=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/hack_code.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/hack_code.rb b/app/models/hack_code.rb index 19de5e4a4..b765a1358 100644 --- a/app/models/hack_code.rb +++ b/app/models/hack_code.rb @@ -1,3 +1,4 @@ class HackCode < ApplicationRecord # 编程题代码相关 + belongs_to :hack end