class Member < ApplicationRecord has_many :member_roles, dependent: :destroy belongs_to :course, optional: true belongs_to :project, optional: true belongs_to :user end