|
|
|
@ -25,7 +25,7 @@ class Meeting < ActiveRecord::Base |
|
|
|
|
belongs_to :author, class_name: 'User', foreign_key: 'author_id' |
|
|
|
|
has_one :agenda, dependent: :destroy, class_name: 'MeetingAgenda' |
|
|
|
|
has_one :minutes, dependent: :destroy, class_name: 'MeetingMinutes' |
|
|
|
|
has_many :contents, class_name: 'MeetingContent', readonly: true |
|
|
|
|
has_many :contents, -> { readonly }, class_name: 'MeetingContent' |
|
|
|
|
has_many :participants, dependent: :destroy, class_name: 'MeetingParticipant' |
|
|
|
|
|
|
|
|
|
default_scope order("#{Meeting.table_name}.start_time DESC") |
|
|
|
|