title: How to post to destroy action with form_for in Rails app?
body: <p>In my Rails app I want my <code>users</code> to enter their password before destroying their own account.</p>
  
  <p>So in my <strong>routes.rb</strong> I added this to my <code>user</code> resource:</p>
  
  <pre><code>resources :users do
    member do
      get :terminate
    end
  end
  </code></pre>
  
  <p>In my <strong>terminate.html.erb</strong> I have this simple form:</p>
  
  <pre><code>&lt;%= form_for(:user, :controller =&gt; "users", :action =&gt; "destroy", :html =&gt; {:method =&gt; "delete"}) do |f| %&gt;
  
    &lt;%= f.label :password %&gt;&lt;br/&gt;
    &lt;%= f.password_field :password %&gt;
  
    &lt;%= f.submit "Terminate account" %&gt;&lt;br/&gt;
  
  &lt;% end %&gt;
  </code></pre>
  
  <p>In my <strong>users_controller.rb</strong> I have this:</p>
  
  <pre><code>def terminate
    @user = User.find(params[:id])
    @title = "Terminate your account"
  end
  
  def destroy
  
    # make sure entered password is correct etc...
  
    @user.destroy
    flash[:success] = "Your account was terminated."
    redirect_to root_path
  end
  </code></pre>
  
  <p>However, when I click submit I get this error:</p>
  
  <pre><code>No route matches [DELETE] "/en/users/7/terminate"
  </code></pre>
  
  <p>What am I missing here?</p>
  
  <p>Thanks for any help.</p>