title: error "uninitialized constant Registration" using Devise for user self-registration and Cancan super_admin register user
body: <p>I followed below tutorial and built one whole complete app.</p>
  
  <p><a href="http://www.tonyamoyal.com/2010/07/28/rails-authentication-with-devise-and-cancan-customizing-devise-controllers/" rel="nofollow">http://www.tonyamoyal.com/2010/07/28/rails-authentication-with-devise-and-cancan-customizing-devise-controllers/</a>
  http://www.tonyamoyal.com/2010/09/29/rails-authentication-with-devise-and-cancan-part-2-restful-resources-for-administrators/comment-page-2/#comment-879</p>
  
  <p>All is well until I ran into a problem towards the end.</p>
  
  <p>The problem is that when a super_admin user try to create a new user. I got error:</p>
  
  <pre><code>Started POST "/users" for 127.0.0.1 at 2012-03-09 23:37:51 -0500
    Processing by RegistrationsController#create as HTML
    Parameters: {"utf8"=&gt;"?", "authenticity_token"=&gt;"c8v6fmCFSlJV2v9qClxD46c1wcBU7n78Mk9xWsJm/Ls=", "user"=&gt;{"email"=&gt;"test@example.com", "password"=&gt;"[FILTERED]", "password_confirmation"=&gt;"[FILTERED]", "customer_attributes"=&gt;{"first_name"=&gt;"test", "last_name"=&gt;"doe"}, "role_ids"=&gt;["", "3"]}, "commit"=&gt;"Sign up"}
  Completed   in 9ms
  </code></pre>
  
  <p>NameError (uninitialized constant Registration):
  What I can figured out is the route conflict. tutorial #1, use devise custom registrations controller for registering new user. tut#2, added another way to create a new user by super_admin. Below is route listing.</p>
  
  <pre><code>cancel_user_registration GET    /users/cancel(.:format)             {:action=&gt;"cancel", :controller=&gt;"registrations"}
         user_registration POST   /users(.:format)                    {:action=&gt;"create", :controller=&gt;"registrations"}
     new_user_registration GET    /users/register(.:format)           {:action=&gt;"new", :controller=&gt;"registrations"}
    edit_user_registration GET    /users/edit(.:format)               {:action=&gt;"edit", :controller=&gt;"registrations"}
                           PUT    /users(.:format)                    {:action=&gt;"update", :controller=&gt;"registrations"}
                           DELETE /users(.:format)                    {:action=&gt;"destroy", :controller=&gt;"registrations"}
         user_confirmation POST   /users/confirmation(.:format)       {:action=&gt;"create", :controller=&gt;"devise/confirmations"}
     new_user_confirmation GET    /users/confirmation/new(.:format)   {:action=&gt;"new", :controller=&gt;"devise/confirmations"}
                           GET    /users/confirmation(.:format)       {:action=&gt;"show", :controller=&gt;"devise/confirmations"}
                     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"}
  </code></pre>
  
  <p>note matching http verb Post /users and user_registrations path was matched first.</p>
  
  <pre><code>                     POST   /users(.:format)                    {:action=&gt;"create", :controller=&gt;"users"}
  
     user_registration POST   /users(.:format)                    {:action=&gt;"create", :controller=&gt;"registrations"}
  </code></pre>
  
  <p>But don’t know what is the best way to avoid this conflict. Can you shed some light on this? I could not figure out from your tutorial.</p>
  
  <p>Thanks in advance,</p>
  
  <p>George</p>