Sha256: 59bc41b4cf14a5904f6a03126baf43623d7118b0f7ecc059c9e7b2bcb862898a
Contents?: true
Size: 548 Bytes
Versions: 28
Compression:
Stored size: 548 Bytes
Contents
module EveApp::EntityHelper def entity(record, size: :medium, description: nil, link_url: nil) title = link_url ? link_to(record.name, link_url) : record.name body = [ content_tag(:h6, title.html_safe), content_tag(:div, description || record.try(:description), class: 'text-sm text-muted') ].join("\n").html_safe wrapper = [ image_tag(record.image), content_tag(:div, body, class: "media-body") ].join("\n").html_safe raw content_tag(:div, wrapper, class: "media media-entity #{size}") end end
Version data entries
28 entries across 28 versions & 1 rubygems