title: How to route and delete devise registration?
body: <p>I've employed devise as the user-authentication gem for my rails web-app.</p>
  
  <p>Using this pre-generated line:</p>
  
  <pre><code>&lt;p&gt;Unhappy? &lt;%= link_to "Cancel my account", registration_path(resource_name), :confirm =&gt; "Are you sure?", :method =&gt; :delete %&gt;.&lt;/p&gt;
  </code></pre>
  
  <p>I wish to delete a user's profile.</p>
  
  <p>The weird thing is that when ever I try delete a user's registration, it fails to do so as it can't seem to find the correct route.</p>
  
  <p>I'm getting this:</p>
  
  <pre><code>ActionController::RoutingError (No route matches "/users"):
  </code></pre>
  
  <p>My <code>routes.rb</code> has:</p>
  
  <pre><code>devise_for :users
  </code></pre>
  
  <p>My <code>rake routes</code> produces:</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 GET    /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"}
       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"}
       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"}
  </code></pre>
  
  <p>What am I missing here?</p>