From 79a71d9430bbb7ddd969608ca3e2074d353138dd Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sat, 12 Oct 2019 18:04:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=96=E9=94=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 11ffe084c..0bebe8584 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -43,7 +43,7 @@ class User < ApplicationRecord has_many :myshixuns, :dependent => :destroy has_many :study_shixuns, through: :myshixuns, source: :shixun # 已学习的实训 has_many :course_messages - has_many :courses, dependent: :destroy + has_many :courses, foreign_key: 'tea_id', dependent: :destroy #试卷 has_many :exercise_banks, :dependent => :destroy