class ActiveAdmin::SidebarSection
Attributes
Public Class Methods
Source
# File lib/active_admin/sidebar_section.rb, line 9 def initialize(name, options = {}, &block) @name = name.to_s @options = options @block = block normalize_display_options! end
Public Instance Methods
Source
# File lib/active_admin/sidebar_section.rb, line 31 def custom_class options[:class] end
Source
# File lib/active_admin/sidebar_section.rb, line 17 def id "#{name.downcase.underscore}_sidebar_section".parameterize end
The id gets used for the div in the view
Source
# File lib/active_admin/sidebar_section.rb, line 27 def partial_name options[:partial] || "#{name.downcase.tr(' ', '_')}_sidebar" end
If a block is not passed in, the name of the partial to render
Source
# File lib/active_admin/sidebar_section.rb, line 35 def priority options[:priority] || 10 end
Source
# File lib/active_admin/sidebar_section.rb, line 22 def title I18n.t("active_admin.sidebars.#{name}", default: name.titlecase) end
The title gets displayed within the section in the view