Class: ActiveAdmin::Views::Pages::Page

Inherits:
Base
  • Object
show all
Defined in:
lib/active_admin/views/pages/page.rb

Instance Method Summary collapse

Methods inherited from Base

#build, #html_title

Instance Method Details

#main_contentObject



7
8
9
10
11
12
13
# File 'lib/active_admin/views/pages/page.rb', line 7

def main_content
  if page_presenter.block
    instance_exec &page_presenter.block
  else
    nil
  end
end

#page_presenterObject (protected)



17
18
19
# File 'lib/active_admin/views/pages/page.rb', line 17

def page_presenter
  active_admin_config.get_page_presenter(:index) || ActiveAdmin::PagePresenter.new
end

#titleObject (protected)



21
22
23
24
25
26
27
# File 'lib/active_admin/views/pages/page.rb', line 21

def title
  if page_presenter[:title]
    render_or_call_method_or_proc_on self, page_presenter[:title]
  else
    active_admin_config.name
  end
end