Module: ActiveAdmin::Resource::Sidebars
- Included in:
- Page, ActiveAdmin::Resource
- Defined in:
- lib/active_admin/resource/sidebars.rb
Instance Method Summary collapse
- #clear_sidebar_sections! ⇒ Object
- #initialize(*args) ⇒ Object
- #sidebar_sections ⇒ Object
- #sidebar_sections? ⇒ Boolean
- #sidebar_sections_for(action) ⇒ Object
Instance Method Details
#clear_sidebar_sections! ⇒ Object
17 18 19 |
# File 'lib/active_admin/resource/sidebars.rb', line 17 def @sidebar_sections = [] end |
#initialize(*args) ⇒ Object
8 9 10 11 |
# File 'lib/active_admin/resource/sidebars.rb', line 8 def initialize(*args) super end |
#sidebar_sections ⇒ Object
13 14 15 |
# File 'lib/active_admin/resource/sidebars.rb', line 13 def @sidebar_sections ||= [] end |
#sidebar_sections? ⇒ Boolean
25 26 27 |
# File 'lib/active_admin/resource/sidebars.rb', line 25 def !!@sidebar_sections && @sidebar_sections.any? end |
#sidebar_sections_for(action) ⇒ Object
21 22 23 |
# File 'lib/active_admin/resource/sidebars.rb', line 21 def (action) .select{|section| section.display_on?(action) } end |