title: Devise Custom Routes and Login Pages
body: <p>I'm trying to get Custom Routes working in my Rails application (Ruby 1.9.2 with Rails 3).</p>
  
  <p>This is my config/routes.rb file</p>
  
  <pre><code>match '/dashboard' =&gt; 'home#dashboard', :as =&gt; 'user_root'
  devise_for :user do
     get "/login", :to =&gt; "devise/sessions#new" # Add a custom sign in route for user sign in
     get "/logout", :to =&gt; "devise/sessions#destroy" # Add a custom sing out route for user sign out
     get "/register", :to =&gt; "devise/registrations#new" # Add a Custom Route for Registrations
  end
  </code></pre>
  
  <p>But submitting the form on /login or /register goes to users/sign_in
  and users/sign_up. How do I prevent this from happening. Or even better make sure that by default all requests for users/sign_in etc go to the relevant routes and not the default routes generated by Devise.</p>
  
  <p>Also how can I make the login form a partial to include it in any controller? So that I can have the Login Page on the homepage (home#index) and not on users/sign_in?</p>
  
  <p>I'm using Devise 1.1.3 with Rails 3 on Ruby 1.9.2, on Mac OSX Snow Leopard.</p>
  
  <p>Thanks!</p>