Class: ActiveAdmin::Views::Popover

Inherits:
Component
  • Object
show all
Defined in:
lib/active_admin/views/components/popover.rb

Direct Known Subclasses

ActionListPopover

Instance Method Summary (collapse)

Instance Method Details

- (Object) add_child(child)



17
18
19
20
21
22
23
# File 'lib/active_admin/views/components/popover.rb', line 17

def add_child(child)
  if @contents_root
    @contents_root << child
  else
    super
  end
end

- (Object) build(options = {}, &block)



7
8
9
10
11
12
13
14
15
# File 'lib/active_admin/views/components/popover.rb', line 7

def build(options = {}, &block)
  options           = options.dup
  contents_root_tag = options.delete(:contents_root_tag) || :div
  options[:style]   = "display: none"

  super(options)

  @contents_root = send(contents_root_tag, class: "popover_contents")
end