From 5ba6e70e1efc398015755984d2c18d052b1d0113 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 7 Nov 2019 11:01:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=AE=E4=BB=B6=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/course.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/course.rb b/app/models/course.rb index ff56ed80..ac073a44 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -26,7 +26,7 @@ class Course < ActiveRecord::Base attr_accessible :code, :extra, :name, :state, :tea_id, :time , :location, :state, :term, :password,:is_public, :description,:class_period, :open_student, :enterprise_name, :is_delete, :syllabus_id, :end_time, :end_term, - :choose_group_allow, :is_end, :homepage_show, :course_list_id, :teacher_list, :student_list, :is_hidden + :choose_group_allow, :is_end, :homepage_show, :course_list_id, :teacher_list, :student_list, :is_hidden, :email_notify #belongs_to :project, :class_name => 'Course', :foreign_key => :extra, primary_key: :identifier belongs_to :teacher, :class_name => 'User', :foreign_key => :tea_id # 定义一个方法teacher,该方法通过tea_id来调用User表 belongs_to :school, :class_name => 'School', :foreign_key => :school_id #定义一个方法school,该方法通过school_id来调用School表