Class: Spina::Admin::Conferences::PresentationAttachmentType
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Spina::Admin::Conferences::PresentationAttachmentType
- Defined in:
- app/models/spina/admin/conferences/presentation_attachment_type.rb
Overview
Instance Attribute Summary collapse
-
#name ⇒ String?
The name of the presentation attachment type.
-
#presentation_attachments ⇒ ActiveRecord::Relation
Directly associated presentation attachments.
Instance Method Summary collapse
-
#sorted ⇒ ActiveRecord::Relation
All presentation attachment types, ordered by name.
Instance Attribute Details
#name ⇒ String?
Returns the name of the presentation attachment type.
18 |
# File 'app/models/spina/admin/conferences/presentation_attachment_type.rb', line 18 translates :name, fallbacks: true |
#presentation_attachments ⇒ ActiveRecord::Relation
Returns directly associated presentation attachments.
26 27 28 29 |
# File 'app/models/spina/admin/conferences/presentation_attachment_type.rb', line 26 has_many :presentation_attachments, class_name: 'Spina::Admin::Conferences::PresentationAttachment', foreign_key: 'attachment_type_id', dependent: :destroy, inverse_of: :attachment_type |
Instance Method Details
#sorted ⇒ ActiveRecord::Relation
Returns all presentation attachment types, ordered by name.
21 |
# File 'app/models/spina/admin/conferences/presentation_attachment_type.rb', line 21 scope :sorted, -> { i18n.order :name } |