Module: Decidim::Conferences::MediaAttachmentsHelper

Defined in:
decidim-conferences/app/helpers/decidim/conferences/media_attachments_helper.rb

Instance Method Summary collapse

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.



14
15
16
# File 'decidim-conferences/app/helpers/decidim/conferences/media_attachments_helper.rb', line 14

def attachment_title(attachment)
  attachment.title.is_a?(Hash) ? translated_attribute(attachment.title) : attachment.title
end