def attachment_title(attachment)
      attachment.title.is_a?(Hash) ? translated_attribute(attachment.title) : attachment.title
    end
def attachment_title(attachment)
      attachment.title.is_a?(Hash) ? translated_attribute(attachment.title) : attachment.title
    end
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.