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