I have an Order resource, nested under User:
ActiveAdmin.register Order do
belongs_to :user
end
# Routes at:
# /admin/users/:user_id/orders/...
I would now also like to create an Order resource, for an overall view. Ideally I'd just do:
ActiveAdmin.register Order do
end
# Routes at:
# /admin/orders/...
But this doesn't work, because it's creating the same underlying class (I assume).
it appears based on this that I should be able to use as: 'all_orders'
, but in fact this still appears to affect the same class, and ends up with routes like /admin/users/:user_id/all_orders/...
So, how can I have both order resources set up and operating independently, both using orders
in the URL?