Class: Spina::Admin::Conferences::PresentationAttachment

Inherits:
ApplicationRecord
  • Object
show all
Defined in:
app/models/spina/admin/conferences/presentation_attachment.rb

Overview

Presentation attachment records.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attachmentSpina::Attachment?

Returns directly associated attachment.

Returns:

  • (Spina::Attachment, nil)

    directly associated attachment



18
# File 'app/models/spina/admin/conferences/presentation_attachment.rb', line 18

belongs_to :attachment, class_name: 'Spina::Attachment'

#presentationPresentation?

Returns directly associated presentation.

Returns:



10
# File 'app/models/spina/admin/conferences/presentation_attachment.rb', line 10

belongs_to :presentation, -> { includes(:translations) }, inverse_of: :attachments, touch: true

#presentation_attachment_typePresentationAttachmentType?

Returns directly associated presentation attachment type.

Returns:



13
14
15
# File 'app/models/spina/admin/conferences/presentation_attachment.rb', line 13

belongs_to :attachment_type, -> { includes(:translations) }, class_name: 'Spina::Admin::Conferences::PresentationAttachmentType',
inverse_of: :presentation_attachments,
touch: true

Instance Method Details

#nameString?

Note:

Returns name of associated presentation attachment type.

Returns:

  • (String, nil)

    name of associated presentation attachment type



23
# File 'app/models/spina/admin/conferences/presentation_attachment.rb', line 23

delegate :name, to: :attachment_type, allow_nil: true