Sha256: f47b6b4ffde662109fd4976f8e3383715b151a467850d6059415f06e80b3ec0a
Contents?: true
Size: 848 Bytes
Versions: 41
Compression:
Stored size: 848 Bytes
Contents
module ActiveAdmin class SidebarSection include ActiveAdmin::OptionalDisplay attr_accessor :name, :options, :block def initialize(name, options = {}, &block) @name, @options, @block = name.to_s, options, block normalize_display_options! end # The id gets used for the div in the view def id "#{name.downcase.underscore}_sidebar_section".parameterize end # The title gets displayed within the section in the view def title I18n.t("active_admin.sidebars.#{name}", default: name.titlecase) end # If a block is not passed in, the name of the partial to render def partial_name options[:partial] || "#{name.downcase.tr(' ', '_')}_sidebar" end def custom_class options[:class] end def priority options[:priority] || 10 end end end
Version data entries
41 entries across 41 versions & 5 rubygems