Sha256: b8568c965613e517ce3d6bbc6efd111098eb841f3c093a359288e42fe3e3894c
Contents?: true
Size: 579 Bytes
Versions: 5
Compression:
Stored size: 579 Bytes
Contents
module MessageTrain # Attachments helper module AttachmentsHelper def attachment_icon(attachment) return image_tag(attachment.attachment.url(:thumb)) if attachment.image? icon_class = 'glyphicon glyphicon-save-file glyphicon-thumbnail' html = content_tag(:span, '', class: icon_class) html << tag(:br) + attachment.attachment_file_name html.html_safe end def attachment_link(attachment) render( partial: 'message_train/application/attachment_link', locals: { attachment: attachment } ) end end end
Version data entries
5 entries across 5 versions & 1 rubygems