Class: ActiveAdmin::Views::SidebarSection
- Defined in:
- lib/active_admin/views/components/sidebar_section.rb
Instance Method Summary collapse
-
#build(section) ⇒ Object
Takes a ActiveAdmin::Sidebar::Section instance.
- #build_sidebar_content ⇒ Object protected
Methods inherited from Panel
Methods inherited from Component
#default_class_name, #initialize, #tag_name
Constructor Details
This class inherits a constructor from ActiveAdmin::Component
Instance Method Details
#build(section) ⇒ Object
Takes a ActiveAdmin::Sidebar::Section instance
8 9 10 11 12 13 |
# File 'lib/active_admin/views/components/sidebar_section.rb', line 8 def build(section) @section = section super(@section.title, :icon => @section.icon) self.id = @section.id end |
#build_sidebar_content ⇒ Object (protected)
17 18 19 20 21 22 23 24 |
# File 'lib/active_admin/views/components/sidebar_section.rb', line 17 def if @section.block rvalue = instance_eval(&@section.block) self << rvalue if rvalue.is_a?(String) else text_node render(@section.partial_name) end end |