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

- (Object) build(namespace)



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

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

- (Boolean) site_title_image?



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

def site_title_image?
  @namespace.site_title_image.present?
end

- (Boolean) site_title_link?



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

def site_title_link?
  @namespace.site_title_link.present?
end

- (Object) tag_name



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

def tag_name
  'h1'
end