class ActiveAdmin::Views::Panel
def add_child(child)
def add_child(child) if @contents @contents << child else super end end
def build(title, attributes = {})
def build(title, attributes = {}) super(attributes) add_class "panel" @title = h3(title.to_s) @contents = div(class: "panel_contents") end
def children?
contents have been added to. This ensures that the panel
Override children? to only report children when the panel's
def children? @contents.children? end
def header_action(*args)
def header_action(*args) action = args[0] @title << div(class: "header_action") do action end end