title: How do I use Devise and ActiveAdmin for the same User model?
body: <p>I have ActiveAdmin and Devise working with Users. I would like to use Devise to log in regular non-admin users with the same User model. How can I do this? (I want to have an <code>admin</code> flag in the User model for only admins.) I tried adding the 2nd line to routes.rb</p>
  
  <pre><code>devise_for :users, ActiveAdmin::Devise.config
  devise_for :users
  </code></pre>
  
  <p>But it gave an error when I tried to list the routes</p>
  
  <pre><code>&gt;rake routes
  DL is deprecated, please use Fiddle
  rake aborted!
  ArgumentError: Invalid route name, already in use: 'new_user_session'
  You may have defined two routes with the same name using the `:as` option, or you may be overriding a route already defined by a resource with the same naming. For the latter, you can restrict the routes created with `resources` as explained here:
  http://guides.rubyonrails.org/routing.html#restricting-the-routes-created
  </code></pre>
  
  <p>I've created an authorization adapter which just checks <code>user.admin == true</code> and that is working OK for ActiveAdmin. <a href="https://github.com/activeadmin/activeadmin/blob/master/docs/13-authorization-adapter.md">https://github.com/activeadmin/activeadmin/blob/master/docs/13-authorization-adapter.md</a></p>