opened
ndbroadbent
username_0
I'm setting up the [ahoy](https://github.com/ankane/ahoy) gem to track some events, and want to show them in Active Admin. `ahoy` creates some models: `Ahoy::Event` and `Ahoy::Visit`. I just want to call these `Visits` and `Events`. I also want to query based on the user or account id.

`app/admin/ahoy/events.rb`:

```
ActiveAdmin.register Ahoy::Event, as: 'Event' do
  controller do
    belongs_to :account, :user, optional: true, polymorphic: true
  end
end
```

When I visit `/admin/events`, I get the following error:

```
undefined method `new_admin_ahoy_event_path' for #<Admin::EventsController:0x00007fb51ff19a88> Did you mean? new_admin_event_path
```

The URL generation is still trying to use the original model class, instead of the renamed resource.

I added `actions :all, :except => [:new]`, because I don't want to create new events in ActiveAdmin. But then I get this error: `undefined method `admin_ahoy_events_path'
Renaming resource with a belongs_to breaks all the generated URLs
issue