I understand that ActiveAdmin supports multiple index pages if the index pages are of different types (table, grid, block, blog), but I need to have two index table pages. I tried
index :as => :table do
...
end
index :as => :table do
...
end
but the index page only displays the first table. Is there a way to display both tables and rename the tabs?
Thanks
Active Admin provides many different tools for you to build a compelling interface into your data for the admin staff. Built in, Active Admin has the following index renderers: All index pages also support scopes, filters, pagination, action items, and sidebar sections.
If you are creating a custom column, you may need to give Active Admin a hint for how to sort the table. You can pass the key specifying the attribute which gets used to sort objects using Active Record. By default, this is the column on the resource’s table that the attribute corresponds to.
To display a filter for an attribute, use the filter method Out of the box, Active Admin supports the following filter types: :string - A drop down for selecting “Contains”, “Equals”, “Starts with”, “Ends with” and an input for a value. :numeric - A drop down for selecting “Equal To”, “Greater Than” or “Less Than” and an input for a value.
Let’s take the example above and use them to filter the Active Admin resource: Basically, that’s it, very straightforward. The only thing I’d like to note is the #preserve_default_filters! method which renders default filters. By default, Ransack allows you to filter by all attributes and relationships in the model.
Have you tried this.
Two pages for the same resource - ActiveAdmin
For example:
ActiveAdmin.register User, :as => 'Waitlist User' do
end
This way you dont need to create a custom index page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With