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 diff --git a/db/migrate/20200223021427_sync_subjectds_mobile.rb b/db/migrate/20200223021427_sync_subjectds_mobile.rb index 1d9f23a37..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