module ActiveAdmin
This is a common set of Formtastic
overrides needed to build a filter form that lets you select from a set of search methods for a given attribute.
Your class must declare available filters for this module to work. Those filters must be recognizable by Ransack. For example:
class NumericInput < ::Formtastic::Inputs::NumberInput include Base include Base::SearchMethodSelect filter :equals, :greater_than, :less_than end
Constants
- Auth
Default
Authorization
permissions for Active Admin- DEFAULT_MENU
- Event
ActiveAdmin::Event
is set to a dispatcher- VERSION
Attributes
Public Class Methods
A callback is triggered each time (after) Active Admin loads the configuration files. This is an opportunity to hook into Resources after they’ve been loaded.
The block takes the current instance of [ActiveAdmin::Application]
Example:
ActiveAdmin.after_load do |app| app.namespaces.each do |name, namespace| puts "Namespace: #{name} loaded!" end end
@param [Block] block A block to call each time (after) AA loads resources
# File lib/active_admin.rb, line 112 def after_load(&block) ActiveSupport::Notifications.subscribe ActiveAdmin::Application::AfterLoadEvent, &ActiveAdmin::Event.wrap_block_for_active_support_notifications(block) end
A callback is triggered each time (before) Active Admin loads the configuration files. In development mode, this will happen whenever the user changes files. In production it only happens on boot.
The block takes the current instance of [ActiveAdmin::Application]
Example:
ActiveAdmin.before_load do |app| # Do some stuff before AA loads end
@param [Block] block A block to call each time (before) AA loads resources
# File lib/active_admin.rb, line 94 def before_load(&block) ActiveSupport::Notifications.subscribe ActiveAdmin::Application::BeforeLoadEvent, &ActiveAdmin::Event.wrap_block_for_active_support_notifications(block) end
Gets called within the initializer
# File lib/active_admin.rb, line 69 def setup application.setup! yield(application) application.prepare! end