Module: ActiveAdmin::ViewHelpers::LayoutHelper
- Included in:
- ActiveAdmin::ViewHelpers
- Defined in:
- lib/active_admin/view_helpers/layout_helper.rb
Instance Method Summary collapse
- #action_items_for_action ⇒ Object
- #body_classes ⇒ Object
-
#sidebar_sections_for_action ⇒ Object
Returns the sidebar sections to render for the current action.
Instance Method Details
#action_items_for_action ⇒ Object
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_classes ⇒ Object
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 |
#sidebar_sections_for_action ⇒ Object
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 if active_admin_config && active_admin_config. active_admin_config.(params[:action], self) else [] end end |