title: Devise within namespace
body: <p>I'm trying to split my rails project in a front-end for regular users and a back-end for admins. Therefore i have created a namespace 'admin' so that i can easily control admin specific controller methods/layouts/authentication in the map admin.</p>
  
  <p>I'm using Devise to register/authenticate my admins only. Because it is only used for admins only i'm trying to move Devise to the admin namespace.</p>
  
  <p>I could not find exactly what i was looking for in the <a href="https://github.com/plataformatec/devise" rel="noreferrer">documentation</a> of Devise but i tried something like this in routes.rb:</p>
  
  <pre><code>namespace 'admin'do 
    devise_for :admins
  end
  </code></pre>
  
  <p>I also tried to make a custom Devise::Sessions controller but that too didn't seem to work out.</p>
  
  <p>Does anyone know how to do this? Should i just use the regular routes for devise with a custom(admin) layout?</p>