Module: ActiveAdmin::ResourceController::Sidebars::ClassMethods
- Defined in:
- lib/active_admin/resource_controller/sidebars.rb
Instance Method Summary collapse
- #clear_sidebar_sections! ⇒ Object
- #sidebar(name, options = {}, &block) ⇒ Object
- #sidebar_sections_for(action) ⇒ Object
Instance Method Details
#clear_sidebar_sections! ⇒ Object
17 18 19 |
# File 'lib/active_admin/resource_controller/sidebars.rb', line 17 def self. = [] end |
#sidebar(name, options = {}, &block) ⇒ Object
13 14 15 |
# File 'lib/active_admin/resource_controller/sidebars.rb', line 13 def (name, = {}, &block) self. << ActiveAdmin::::Section.new(name, , &block) end |
#sidebar_sections_for(action) ⇒ Object
21 22 23 |
# File 'lib/active_admin/resource_controller/sidebars.rb', line 21 def (action) .select{|section| section.display_on?(action) } end |