Sha256: 9c5d4f39606f0d878a580d5dde26ae6c170ca59df52838d09cdbf45ee15b4f80
Contents?: true
Size: 734 Bytes
Versions: 14
Compression:
Stored size: 734 Bytes
Contents
# frozen_string_literal: true module ActiveAdmin class SidebarSection include ActiveAdmin::OptionalDisplay attr_accessor :name, :options, :block def initialize(name, options = {}, &block) @name = name.to_s @options = options @block = block normalize_display_options! end # The id gets used for the div in the view def id "#{name.downcase.underscore}_sidebar_section".parameterize 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
14 entries across 14 versions & 1 rubygems