module ActiveAdmin
def after_load(&block)
-
block
(Block
) -- A block to call each time (after) AA loads resources
def after_load(&block) ActiveSupport::Notifications.subscribe ActiveAdmin::Application::AfterLoadEvent, &wrap_block_for_active_support_notifications(block) end
def application
def application @application ||= ::ActiveAdmin::Application.new end
def before_load(&block)
-
block
(Block
) -- A block to call each time (before) AA loads resources
def before_load(&block) ActiveSupport::Notifications.subscribe ActiveAdmin::Application::BeforeLoadEvent, &wrap_block_for_active_support_notifications(block) end
def deprecator
def deprecator @deprecator ||= ActiveSupport::Deprecation.new("4.1", "active-admin") end
def importmap
def importmap @importmap ||= Importmap::Map.new end
def setup
def setup application.setup! yield(application) application.prepare! end
def wrap_block_for_active_support_notifications block
def wrap_block_for_active_support_notifications block proc { |_name, _start, _finish, _id, payload| block.call payload[:active_admin_application] } end