- Installation
- General Configuration
- Authentication
- Site Title Options
- Internationalization (I18n)
- Namespaces
- Load paths
- Comments
- Utility Navigation
- Working with Resources
- Rename the Resource
- Customize the Namespace
- Customize the Menu
- Scoping the queries
- Customizing resource retrieval
- Belongs To
- Customizing the Index Page
- Customizing the CSV format
- Customizing the Form
- Customize the Show Page
- Sidebar Sections
- Custom Controller Actions
- Index Batch Actions
- Custom Pages
- Decorators
- Arbre Components
- Authorization Adapter
Custom Index
If the supplied Active Admin index components are insufficient for your project
feel free to define your own. Index classes inherit from ActiveAdmin::Component
and require a build
method and an index_name
class method.
module ActiveAdmin
module Views
class IndexAsMyIdea < ActiveAdmin::Component
def build(page_presenter, collection)
# ...
end
def self.index_name
"my_idea"
end
end
end
end
The build method takes a PagePresenter object and collection of whatever you choose.
The index_name
class method takes no arguments and returns a string that should
be representative of the class name. If this method is not defined, your
index component will not be able take advantage of Active Admin’s
multiple index pages feature.