title: Overriding Devise's registration controller to allow for a redirect after a successful sign_up has been done
body: <p>I have looked all over the place, and found a lot of info... but nothing works for me and I don't get it :(</p>
  
  <p>I know that you are suppose to override the registration controller, like this:</p>
  
  <pre><code>class Users::RegistrationsController &lt; Devise::RegistrationsController
  
  def after_sign_up_path_for(resource)
    authors_waiting_path
  end 
  
  end
  </code></pre>
  
  <p>Then following the example showed by Tony Amoyal <a href="http://www.tonyamoyal.com/2010/07/28/rails-authentication-with-devise-and-cancan-customizing-devise-controllers/" rel="nofollow noreferrer">http://www.tonyamoyal.com/2010/07/28/rails-authentication-with-devise-and-cancan-customizing-devise-controllers/</a>, I am supposed to change my routes to update the access the new controller:</p>
  
  <pre><code>devise_for :users, :controllers =&gt; { :registrations =&gt; "users/registrations" } do
  #get '/author/sign_up', :to =&gt; 'devise/registrations#new'
  #get '/client/sign_up', :to =&gt; 'devise/registrations#new'  
  get '/author/sign_up', :to =&gt; 'users/registrations#new'
  get '/client/sign_up', :to =&gt; 'users/registrations#new'      
  end
  </code></pre>
  
  <p>Yes, I have something a bit strange here, because I am catching some specific path to send them to the registration page, this allows me to create effectively 2 registration scenario.
  I commented what I had before I had overridden the registration controller.</p>
  
  <p>Even with all this and my authors_waiting_path being a valid path, it just keeps on going to the sign-in page after registration :(</p>
  
  <p>This is really frustrating.</p>
  
  <p>Alex</p>
  
  <p>edit: I also found this on the devise wiki: <a href="https://github.com/plataformatec/devise/wiki/How-To:-Redirect-after-registration-(sign-up)" rel="nofollow noreferrer">https://github.com/plataformatec/devise/wiki/How-To:-Redirect-after-registration-(sign-up)</a></p>
  
  <p>But I have no idea where to define this create method ? should I override the session controller ???</p>
  
  <p>edit 2:</p>
  
  <p>I put a dummy override of the controller:</p>
  
  <pre><code>  class Pouets::RegistrationsController &lt; Devise::RegistrationsController
  
      def after_sign_up_path_for(resource)
        authors_waiting_path
      end 
  
      def new
        super
      end
  
      def create
        puts "was here"
        super
      end
  
      def edit
        super
      end
  
      def update
        super
      end
  
      def destroy
        super
      end
  
      def cancel
        super
      end
  
    end
  </code></pre>
  
  <p>And I never the "was here" in my logs.... I really have the feeling that it's totally ignoring the override... I must be doing something wrong :(</p>