dev_hs
cxt 6 years ago
parent 8f19e8bc88
commit b039fd5839

@ -19,7 +19,7 @@ class Subject < ApplicationRecord
has_many :stages, -> { order("stages.position ASC") }, dependent: :destroy
# 开放课堂
has_many :courses, -> { order("courses.id ASC") }
has_many :courses, -> { where("is_delete = 0").order("courses.id ASC") }
validates :name, length: { maximum: 60 }
validates :description, length: { maximum: 5000 }

Loading…
Cancel
Save