I have an index page:
ActiveAdmin.register Activity do
config.sort_order = ''
belongs_to :specialist, optional: true
belongs_to :activities_category, optional: true
end
And I have another index page for the same but renamed resource:
ActiveAdmin.register Activity, as: 'ModeratedActivity' do
config.sort_order = 'updated_at_asc'
actions :index, :show
belongs_to :specialist, optional: true
belongs_to :activities_category, optional: true
...
end
These pages have totally different index tables, filters and permissions.
The problem is that id_colunm, index actions and filters form of ModeratedActivity page route to Activity page actions.
For example: filters form on ModeratedActivity page should route to:
/admin/moderated_activities?[filter_params]
But actually route to:
/admin/activities?[filter_params]
Tried to change controller defaults on ModeratedActivity page:
controller do
defaults :route_collection_name => "moderated_activities", route_instance_name: "moderated_activity", :collection_name => 'moderated_activities', :instance_name => 'moderated_activity', :resource_class => Activity
...
end
Didn't help.