Class: ActiveAdmin::SidebarSection
- Inherits:
-
Object
- Object
- ActiveAdmin::SidebarSection
- Includes:
- OptionalDisplay
- Defined in:
- lib/active_admin/sidebar_section.rb
Instance Attribute Summary (collapse)
-
- (Object) block
Returns the value of attribute block.
-
- (Object) name
Returns the value of attribute name.
-
- (Object) options
Returns the value of attribute options.
Instance Method Summary (collapse)
- - (Object) icon
- - (Boolean) icon?
-
- (Object) id
The id gets used for the div in the view.
-
- (SidebarSection) initialize(name, options = {}, &block)
constructor
A new instance of SidebarSection.
-
- (Object) partial_name
If a block is not passed in, the name of the partial to render.
-
- (Object) title
The title gets displayed within the section in the view.
Methods included from OptionalDisplay
Constructor Details
- (SidebarSection) initialize(name, options = {}, &block)
A new instance of SidebarSection
8 9 10 11 |
# File 'lib/active_admin/sidebar_section.rb', line 8 def initialize(name, = {}, &block) @name, @options, @block = name, , block end |
Instance Attribute Details
- (Object) block
Returns the value of attribute block
6 7 8 |
# File 'lib/active_admin/sidebar_section.rb', line 6 def block @block end |
- (Object) name
Returns the value of attribute name
6 7 8 |
# File 'lib/active_admin/sidebar_section.rb', line 6 def name @name end |
- (Object) options
Returns the value of attribute options
6 7 8 |
# File 'lib/active_admin/sidebar_section.rb', line 6 def @options end |
Instance Method Details
- (Object) icon
22 23 24 |
# File 'lib/active_admin/sidebar_section.rb', line 22 def icon [:icon] if icon? end |
- (Boolean) icon?
18 19 20 |
# File 'lib/active_admin/sidebar_section.rb', line 18 def icon? [:icon] end |
- (Object) id
The id gets used for the div in the view
14 15 16 |
# File 'lib/active_admin/sidebar_section.rb', line 14 def id "#{name.to_s.downcase.underscore}_sidebar_section".parameterize end |
- (Object) partial_name
If a block is not passed in, the name of the partial to render
32 33 34 |
# File 'lib/active_admin/sidebar_section.rb', line 32 def partial_name [:partial] || "#{name.to_s.downcase.gsub(' ', '_')}_sidebar" end |
- (Object) title
The title gets displayed within the section in the view
27 28 29 |
# File 'lib/active_admin/sidebar_section.rb', line 27 def title I18n.t("active_admin.sidebars.#{name.to_s}", :default => name.to_s.titlecase) end |