Class: Spina::Admin::Conferences::Session
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Spina::Admin::Conferences::Session
- Defined in:
- app/models/spina/admin/conferences/session.rb
Overview
Instance Attribute Summary collapse
-
#conference ⇒ Conference?
Conference associated with #presentation_type.
-
#institution ⇒ Institution?
Institution associated with #room.
-
#name ⇒ String?
The name of the session.
-
#presentations ⇒ ActiveRecord::Relation
Directly associated presentations.
-
#room ⇒ PresentationType?
Directly associated presentation type.
Instance Method Summary collapse
-
#presentation_type_name ⇒ String?
Name of associated presentation type.
-
#room_name ⇒ String?
Name of associated room.
Instance Attribute Details
#conference ⇒ Conference?
Returns Conference associated with #presentation_type.
31 |
# File 'app/models/spina/admin/conferences/session.rb', line 31 has_one :conference, -> { includes(:translations) }, through: :presentation_type |
#institution ⇒ Institution?
Returns Institution associated with #room.
36 |
# File 'app/models/spina/admin/conferences/session.rb', line 36 has_one :institution, -> { includes(:translations) }, through: :room |
#name ⇒ String?
Returns the name of the session.
18 |
# File 'app/models/spina/admin/conferences/session.rb', line 18 translates :name, fallbacks: true |
#presentations ⇒ ActiveRecord::Relation
Note:
A session cannot be destroyed if it has dependent presentations.
Returns directly associated presentations.
41 |
# File 'app/models/spina/admin/conferences/session.rb', line 41 has_many :presentations, inverse_of: :session, dependent: :restrict_with_error |
#room ⇒ PresentationType?
Returns directly associated presentation type.
22 |
# File 'app/models/spina/admin/conferences/session.rb', line 22 belongs_to :room, -> { includes(:translations) }, inverse_of: :sessions, touch: true |
Instance Method Details
#presentation_type_name ⇒ String?
Note:
Delegated to #presentation_type.
Returns name of associated presentation type.
52 |
# File 'app/models/spina/admin/conferences/session.rb', line 52 delegate :name, to: :presentation_type, prefix: true, allow_nil: true |
#room_name ⇒ String?
Note:
Delegated to #room.
Returns name of associated room.
48 |
# File 'app/models/spina/admin/conferences/session.rb', line 48 delegate :name, to: :room, prefix: true, allow_nil: true |