Sha256: 9c09dbfe65f52b303eb01117dd0f3515731909748f9a098b36c3d938773f0f14
Contents?: true
Size: 559 Bytes
Versions: 13
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
13 entries across 13 versions & 1 rubygems