title: How to configure ActiveAdmin routes to get 2 signin pages (for a user and for an admin) with 1 User model?
body: <p>My project had 2 models: <strong>AdminUser</strong> and <strong>User</strong>.</p>
  
  <p>I'd removed the <strong>AdminUser</strong> model (and db tables associated) and now I'm using my <strong>User</strong> model with an <code>admin?</code> method (I've had a boolean admin field in the users table)</p>
  
  <p>ActiveAdmin documentation:</p>
  
  <blockquote>
    <p>You can skip the Devise user class all together by using the
    skip-users flag:</p>
  
  <pre><code>$&gt; rails generate active_admin:install --skip-users
  </code></pre>
    
    <p>NOTE: If you don’t use the default user settings, you will need to
    configure the settings in config/intializers/active_admin.rb to suite
    your needs.</p>
  </blockquote>
  
  <p>Here's what I've found in the initializer:  </p>
  
  <pre><code>config.authentication_method = :authenticate_admin_user!
  config.current_user_method = :current_admin_user
  </code></pre>
  
  <p>So, I've modified <code>application_controller.rb</code> as:</p>
  
  <pre><code>def authenticate_admin_user!
    render(:file =&gt; "#{Rails.root}/public/403.html", :status =&gt; 403, :layout =&gt; false) and return if user_signed_in? &amp;&amp; !current_user.admin?
    authenticate_user!
  end
  
  def current_admin_user
    return nil if user_signed_in? &amp;&amp; !current_user.admin?
    current_user
  end
  </code></pre>
  
  <p>And in routes.rb:</p>
  
  <pre><code>devise_for :admin_users, ActiveAdmin::Devise.config.merge(:class_name =&gt; 'User')
  </code></pre>
  
  <p>How can I configure ActiveAdmin to access admin section with the ActiveAdmin default path: <code>/admin</code>?</p>
  
  <p>My objective is to have 1 User model, but 2 separate signin pages:</p>
  
  <ul>
  <li><strong>/users/sign_in</strong> (default devise signin)</li>
  <li><strong>/admin</strong> (ActiveAdmin signin)</li>
  </ul>
  
  <p>For now, when I try to access <strong>/admin</strong>, I'm redirected to <strong>/users/sign_in</strong> page :-(</p>
  
  <p>Thx for your advices...</p>