Sha256: 1e544a6dc60635e16e76c3d68728946d51d03349a134f6fed521505bc44f26bc
Contents?: true
Size: 559 Bytes
Versions: 4
Compression:
Stored size: 559 Bytes
Contents
require "active_admin/helpers/optional_display" module ActiveAdmin class Resource module Sidebars def sidebar_sections @sidebar_sections ||= [] end def clear_sidebar_sections! @sidebar_sections = [] end def sidebar_sections_for(action, render_context = nil) sidebar_sections.select { |section| section.display_on?(action, render_context) } .sort_by(&:priority) end def sidebar_sections? !!@sidebar_sections && @sidebar_sections.any? end end end end
Version data entries
4 entries across 4 versions & 2 rubygems