Module: ActiveAdmin::ViewHelpers::LayoutHelper

Included in:
ActiveAdmin::ViewHelpers
Defined in:
lib/active_admin/view_helpers/layout_helper.rb

Instance Method Summary collapse

Instance Method Details

#action_items_for_actionObject



5
6
7
8
9
10
11
# File 'lib/active_admin/view_helpers/layout_helper.rb', line 5

def action_items_for_action
  if active_admin_config && active_admin_config.action_items?
    active_admin_config.action_items_for(params[:action], self)
  else
    []
  end
end

#body_classesObject



13
14
15
16
17
18
19
20
# File 'lib/active_admin/view_helpers/layout_helper.rb', line 13

def body_classes
  Arbo::HTML::ClassList.new [
    params[:action],
    params[:controller].tr('/', '_'),
    'active_admin', 'logged_in',
    active_admin_namespace.name.to_s + '_namespace'
  ]
end

Returns the sidebar sections to render for the current action



23
24
25
26
27
28
29
# File 'lib/active_admin/view_helpers/layout_helper.rb', line 23

def sidebar_sections_for_action
  if active_admin_config && active_admin_config.sidebar_sections?
    active_admin_config.sidebar_sections_for(params[:action], self)
  else
    []
  end
end