Method: ActiveAdmin::MenuCollection#on_build

Defined in:
lib/active_admin/menu_collection.rb

#on_build(&block) ⇒ Object

Add callbacks that will be run when the menu is going to be built. This helps use with reloading and allows configurations to add items to menus.

Parameters:

  • block (Proc)

    A block which will be ran when the menu is built. The will have the menu collection yielded.



45
46
47
# File 'lib/active_admin/menu_collection.rb', line 45

def on_build(&block)
  @build_callbacks << block
end