|
|
@ -7,7 +7,7 @@ class Course < ApplicationRecord
|
|
|
|
|
|
|
|
|
|
|
|
has_many :course_infos, dependent: :destroy
|
|
|
|
has_many :course_infos, dependent: :destroy
|
|
|
|
# 课堂左侧导航栏的模块
|
|
|
|
# 课堂左侧导航栏的模块
|
|
|
|
has_many :course_modules, -> {where hidden: 0}, dependent: :destroy
|
|
|
|
has_many :course_modules, dependent: :destroy
|
|
|
|
has_many :board_course_modules, -> { board_module }, class_name: "CourseModule"
|
|
|
|
has_many :board_course_modules, -> { board_module }, class_name: "CourseModule"
|
|
|
|
has_many :attachment_course_modules, -> { attachment_module }, class_name: "CourseModule"
|
|
|
|
has_many :attachment_course_modules, -> { attachment_module }, class_name: "CourseModule"
|
|
|
|
has_many :common_course_modules, -> { common_homework_module }, class_name: "CourseModule"
|
|
|
|
has_many :common_course_modules, -> { common_homework_module }, class_name: "CourseModule"
|
|
|
|