title: Custom Registrations Controller for Devise not Overriding Create Action
body: <p>I have been fighting with this for days now. I have created my own Registrations Controller to allow for an amdin to create and delete users. I have left the <code>:registerable</code> module in my devise configuration, as I also want to users to be able to edit their profiles. I have tried taking that module out just to see if it would solve my issue. The problem that I have, is that when I create a new user as an admin, it still signs that user in, despite having my own create action. I have tried everything that I can think of to get beyond this and I am stuck.</p>
  
  <p>My Registrations Controller:</p>
  
  <pre><code>  class RegistrationsController &lt; Devise::RegistrationsController
  
    load_and_authorize_resource
  
    def new
      super
    end
  
    def create
      resource.build
      if resource.save
        redirect_to users_path
      else
        clean_up_passwords(resource)
        render_with_scope :new
      end
    end
  
  end
  </code></pre>
  
  <p>Application Controller: => note, <code>after_sign_up_path_for</code> was overriden here as a test to see if that would work</p>
  
  <pre><code>class ApplicationController &lt; ActionController::Base
  
    protect_from_forgery
  
    rescue_from CanCan::AccessDenied do |exception|
      flash[:error] = exception.message
      redirect_to projects_url
    end
  
    protected
  
      def stored_location_for(resource)
        nil
      end
  
      def after_sign_in_path_for(resource)
        projects_url
      end
  
      def after_sign_up_path_for(resource)
        users_path
      end
  
  end
  </code></pre>
  
  <p>Routes File:</p>
  
  <pre><code>DeviseTest::Application.routes.draw do
  
    devise_for :users, :controller =&gt; { :registrations =&gt; "registrations"}
    devise_scope :user do
      get '/login' =&gt; 'devise/sessions#new'
      get '/logout' =&gt; 'devise/sessions#destroy'
    end
  
    resources :users, :controller =&gt; "users"
  
    resources :projects
  
    root :to =&gt; 'home#index'
  
    end
  </code></pre>
  
  <p>And my Users Controller for admin view</p>
  
  <pre><code>class UsersController &lt; ApplicationController
  
    load_and_authorize_resource
  
    # GET /users
    # GET /users.xml
    def index
      @users = User.excludes( :id =&gt; current_user.id )
  
      respond_to do |format|
        format.html # index.html.erb
        format.xml  { render :xml =&gt; @users }
      end
    end
  
    # DELETE /users/1
    # DELETE /users/1.xml
    def destroy
      @user = User.find(params[:id])
      @user.destroy
  
      respond_to do |format|
        format.html { redirect_to(users_url) }
        format.xml  { head :ok }
      end
    end
  end
  </code></pre>
  
  <p>Rake Routes Output:</p>
  
  <pre><code>new_user_session GET    /users/sign_in(.:format)       {:action=&gt;"new", :controller=&gt;"devise/sessions"}
              user_session POST   /users/sign_in(.:format)       {:action=&gt;"create", :controller=&gt;"devise/sessions"}
      destroy_user_session DELETE /users/sign_out(.:format)      {:action=&gt;"destroy", :controller=&gt;"devise/sessions"}
             user_password POST   /users/password(.:format)      {:action=&gt;"create", :controller=&gt;"devise/passwords"}
         new_user_password GET    /users/password/new(.:format)  {:action=&gt;"new", :controller=&gt;"devise/passwords"}
        edit_user_password GET    /users/password/edit(.:format) {:action=&gt;"edit", :controller=&gt;"devise/passwords"}
                           PUT    /users/password(.:format)      {:action=&gt;"update", :controller=&gt;"devise/passwords"}
  cancel_user_registration GET    /users/cancel(.:format)        {:action=&gt;"cancel", :controller=&gt;"devise/registrations"}
         user_registration POST   /users(.:format)               {:action=&gt;"create", :controller=&gt;"devise/registrations"}
     new_user_registration GET    /users/sign_up(.:format)       {:action=&gt;"new", :controller=&gt;"devise/registrations"}
    edit_user_registration GET    /users/edit(.:format)          {:action=&gt;"edit", :controller=&gt;"devise/registrations"}
                           PUT    /users(.:format)               {:action=&gt;"update", :controller=&gt;"devise/registrations"}
                           DELETE /users(.:format)               {:action=&gt;"destroy", :controller=&gt;"devise/registrations"}
                     login GET    /login(.:format)               {:controller=&gt;"devise/sessions", :action=&gt;"new"}
                    logout GET    /logout(.:format)              {:controller=&gt;"devise/sessions", :action=&gt;"destroy"}
                     users GET    /users(.:format)               {:action=&gt;"index", :controller=&gt;"users"}
                           POST   /users(.:format)               {:action=&gt;"create", :controller=&gt;"users"}
                  new_user GET    /users/new(.:format)           {:action=&gt;"new", :controller=&gt;"users"}
                 edit_user GET    /users/:id/edit(.:format)      {:action=&gt;"edit", :controller=&gt;"users"}
                      user GET    /users/:id(.:format)           {:action=&gt;"show", :controller=&gt;"users"}
                           PUT    /users/:id(.:format)           {:action=&gt;"update", :controller=&gt;"users"}
                           DELETE /users/:id(.:format)           {:action=&gt;"destroy", :controller=&gt;"users"}
                  projects GET    /projects(.:format)            {:action=&gt;"index", :controller=&gt;"projects"}
                           POST   /projects(.:format)            {:action=&gt;"create", :controller=&gt;"projects"}
               new_project GET    /projects/new(.:format)        {:action=&gt;"new", :controller=&gt;"projects"}
              edit_project GET    /projects/:id/edit(.:format)   {:action=&gt;"edit", :controller=&gt;"projects"}
                   project GET    /projects/:id(.:format)        {:action=&gt;"show", :controller=&gt;"projects"}
                           PUT    /projects/:id(.:format)        {:action=&gt;"update", :controller=&gt;"projects"}
                           DELETE /projects/:id(.:format)        {:action=&gt;"destroy", :controller=&gt;"projects"}
                      root        /(.:format)                    {:controller=&gt;"home", :action=&gt;"index"}
  </code></pre>
  
  <p>Everything else works as expected, I just cannot get the created user to not be signed in. It's not a huge issue for creating one user, but if I need to create 3 or 4, it's a huge p.i.t.a to have to signout, signin, every single time.</p>
  
  <p>Any help on this is greatly appreciated.</p>