42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# File 'lib/activeadmin/favorites/view_lens/patches.rb', line 42
def build(title, attributes = {})
layout = Applicator.current_layout
panel_id = Applicator.(title, attributes)
resource_key = helpers.active_admin_config&.resource_name&.route_key
if resource_key.present? && panel_id.present?
Applicator.register_panel(resource_key: resource_key, id: panel_id, label: title.to_s)
end
return if layout&.hidden_panel?(panel_id)
attributes = attributes.merge("data-lens-panel": panel_id)
super
end
|