Sha256: 839e00bfe7911163c3728d6463b488112a97da7844b06ff6e46e6b4eca4ff628

Contents?: true

Size: 538 Bytes

Versions: 8

Compression:

Stored size: 538 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # A Helper to render and link to resources.
  module Conferences
    module MediaAttachmentsHelper
      # 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.
      def attachment_title(attachment)
        attachment.title.is_a?(Hash) ? translated_attribute(attachment.title) : attachment.title
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
decidim-conferences-0.28.5 app/helpers/decidim/conferences/media_attachments_helper.rb
decidim-conferences-0.28.4 app/helpers/decidim/conferences/media_attachments_helper.rb
decidim-conferences-0.28.3 app/helpers/decidim/conferences/media_attachments_helper.rb
decidim-conferences-0.28.2 app/helpers/decidim/conferences/media_attachments_helper.rb
decidim-conferences-0.28.1 app/helpers/decidim/conferences/media_attachments_helper.rb
decidim-conferences-0.28.0 app/helpers/decidim/conferences/media_attachments_helper.rb
decidim-conferences-0.28.0.rc5 app/helpers/decidim/conferences/media_attachments_helper.rb
decidim-conferences-0.28.0.rc4 app/helpers/decidim/conferences/media_attachments_helper.rb