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 Metasearch. For example:
class FilterNumericInput < ::Formtastic::Inputs::NumberInput include FilterBase include FilterBase::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 109 def after_load(&block) ActiveAdmin::Event.subscribe ActiveAdmin::Application::AfterLoadEvent, &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 91 def before_load(&block) ActiveAdmin::Event.subscribe ActiveAdmin::Application::BeforeLoadEvent, &block end
Gets called within the initializer
# File lib/active_admin.rb, line 66 def setup application.setup! yield(application) application.prepare! end