Sha256: 736d84463d099413753792a62193874f767ea9ac54556910b897fffdeb6f640f
Contents?: true
Size: 643 Bytes
Versions: 3
Compression:
Stored size: 643 Bytes
Contents
module ActiveAdmin module Views class SiteTitle < Component def tag_name 'h1' end def build(namespace) super(id: "site_title") text_node site_title_content(namespace) end private def site_title_content(namespace) content = namespace.site_title(helpers) image = namespace.site_title_image(helpers) link = namespace.site_title_link content = helpers.image_tag(image, id: "site_title_image", alt: content) if image.present? content = helpers.link_to(content, link) if link.present? content end end end end
Version data entries
3 entries across 3 versions & 1 rubygems