I have two Rails projects sharing some files, one is the actual app and the other one is the admin tool for the app. They share migrations, models, some config, etc. The admin tools is ActiveAdmin 1.0.0-pre2 and Rails' version is 4.2.

I have two Devise models, User and AdminUser. In the app project, there's no route for admin\_user and I want to keep it that way, but if I don't add:

```
devise_for :admin_users

```

to the routes file, I get all sort of strange errors, such as:

```
ActionView::Template::Error: undefined method `admin_user_confirmation_url' for #<ActionDispatch::Routing::RoutesProxy:0x007fc613ecde08>

```

or:

```
Could not find a valid mapping for <AdminUser ...>

```

whenever I'm creating an AdminUser in the app project (sample data generation).

How can I achieve having a devise model, without the routes?