7

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

user1438568
  • 83
  • 1
  • 5
  • Does this answer your question? [ActiveAdmin: how to add second custom index table page](https://stackoverflow.com/questions/25662981/activeadmin-how-to-add-second-custom-index-table-page) – Robert Jan 15 '20 at 15:25

2 Answers2

5

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.

Community
  • 1
  • 1
James
  • 744
  • 1
  • 4
  • 10
2

Having two index table pages will not work as you expected as Active_admin will always pick the first match of index :as => :table.

In order to achieve the required result i.e., two index table pages, what you can do is, keep one as index table page and for other create a custom index.

Refer to Multiple Index Pages section and Create your own index page.

Hope this helps.

Kirti Thorat
  • 52,578
  • 9
  • 101
  • 108