lecture-attendance-manager/app/models/course.rb

8 lines
310 B
Ruby

class Course < ApplicationRecord
has_many :lectures, dependent: :destroy
# A course has a standalone connection to its recordings. To be shown they must be associated with a lecture but we
# track those not associated with a lecture to avoid duplication.
has_many :recordings, dependent: :destroy
end