Class: ActiveAdmin::Views::SiteTitle

Inherits:
Component
  • Object
show all
Defined in:
lib/active_admin/views/components/site_title.rb

Instance Method Summary collapse

Instance Method Details

#build(namespace) ⇒ Object


11
12
13
14
15
16
17
18
19
20
# File 'lib/active_admin/views/components/site_title.rb', line 11

def build(namespace)
  super(id: "site_title")
  @namespace = namespace

  if site_title_link?
    text_node site_title_with_link
  else
    text_node site_title_content
  end
end

#site_title_imageObject


26
27
28
# File 'lib/active_admin/views/components/site_title.rb', line 26

def site_title_image
  @site_title_image ||= @namespace.site_title_image(helpers)
end

#site_title_link?Boolean

Returns:

  • (Boolean)

22
23
24
# File 'lib/active_admin/views/components/site_title.rb', line 22

def site_title_link?
  @namespace.site_title_link.present?
end

#tag_nameObject


7
8
9
# File 'lib/active_admin/views/components/site_title.rb', line 7

def tag_name
  "h1"
end