You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
417 B
10 lines
417 B
class SubDiscipline < ApplicationRecord
|
|
belongs_to :discipline
|
|
has_many :tag_disciplines, dependent: :destroy
|
|
has_one :hack
|
|
|
|
has_many :shixun_tag_disciplines, -> { where("shixun = 1") }, class_name: "TagDiscipline"
|
|
has_many :subject_tag_disciplines, -> { where("subject = 1") }, class_name: "TagDiscipline"
|
|
has_many :question_tag_disciplines, -> { where("question = 1") }, class_name: "TagDiscipline"
|
|
end
|