Sha256: 98636207e8064a4c2409ee10d149ea9d04c34bbeae595664bc08ca2e7fb603c8
Contents?: true
Size: 589 Bytes
Versions: 29
Compression:
Stored size: 589 Bytes
Contents
# frozen_string_literal: true 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
29 entries across 29 versions & 1 rubygems