Reputation: 699
In my Rails application I have, for an example, models Client and Service, with an association one to many. I've registered Client as a resource in active admin, but I don't want to create separate index page for Services. I want to be able to view services that belong to client at the client's show page, but I want services list look like as it would be displayed at the own index page: as table with sortable columns etc. Something like at the image below:
The client details part is rendered via partial.
Upvotes: 9
Views: 2188
Reputation: 2978
The sorting functionality is provided by an Arbre component called IndexAsTable. Register the resource ClientService { belongs_to :client }
Upvotes: 0