Module: Decidim::Conferences::MediaAttachmentsHelper
- Defined in:
- app/helpers/decidim/conferences/media_attachments_helper.rb
Instance Method Summary collapse
-
#attachment_title(attachment) ⇒ Object
Renders the attachment’s title.
-
#attachments_for_conference(attached_to) ⇒ Object
Renders the attachments of a Conference that includes the HasAttachments concern.
Instance Method Details
#attachment_title(attachment) ⇒ Object
Renders the attachment’s title. Checks if the attachment’s title is translated or not and use the correct render method.
attachment - An Attachment object
Returns String.
24 25 26 |
# File 'app/helpers/decidim/conferences/media_attachments_helper.rb', line 24 def () .title.is_a?(Hash) ? translated_attribute(.title) : .title end |
#attachments_for_conference(attached_to) ⇒ Object
Renders the attachments of a Conference that includes the HasAttachments concern.
attached_to - The model to render the attachments from.
Returns nothing.
13 14 15 |
# File 'app/helpers/decidim/conferences/media_attachments_helper.rb', line 13 def (attached_to) render partial: "attachments", locals: { attached_to: attached_to } end |