Question

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

Était-ce utile?

La solution 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.

Autres conseils

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top