title: How to override devise to redirect to a different URL other than the root when user login or register?
body: <p>I am using devise and I have a root pointing <code>home#index</code>, now I want to override devise when a user register or login to redirect to <code>project#show</code> instead of the root(home#index). What method do I put in the overidden devise controller? Also do I have to add anything in the routes.rb?</p>
  
  <p>Thank you in advance!</p>
  
  <pre><code> class RegistrationsController &lt; Devise::RegistrationsController
  
  
    end
  </code></pre>
  
  <p>routes.rb</p>
  
  <pre><code>      Parks::Application.routes.draw do
        resources :home, :project
        devise_for :users
        root :to =&gt; "home#index"
        end 
  </code></pre>
  
  <p>available path</p>
  
  <pre><code>       show_project_path
  </code></pre>