title: Rails Redirect After Delete Using DELETE Instead of GET
body: <p>I have a route I am issuing a <code>DELETE</code> on:</p>
  
  <pre><code>user_authorization_path(@user, authorization)
  </code></pre>
  
  <p>It hits my controller fine, the controller deletes the resource, and then issues a redirect:</p>
  
  <pre><code>redirect_to edit_user_path(params[:user_id])
  </code></pre>
  
  <p>The result of this is a routing error on redirect:</p>
  
  <pre><code>ActionController::RoutingError (No route matches [DELETE] "/users/1/edit")
  </code></pre>
  
  <p>I can see in the logs rails is doing the right thing until the redirect, which it is trying to issue another <code>DELETE</code> instead of a <code>GET</code>: </p>
  
  <pre><code>Started DELETE "/users/1/authorizations/12"...
  ...
  Redirected to http://localhost:3000/users/1/edit
  Completed 302 Found in 8ms (ActiveRecord: 0.2ms)
  
  Started DELETE "/users/1/edit"...
  
  ActionController::RoutingError (No route matches [DELETE] "/users/1/edit")
  </code></pre>
  
  <p>The Chrome debugger shows the initial request:</p>
  
  <pre><code>Request URL:http://localhost:3000/users/1/authorizations/12
  Request Method:DELETE
  Status Code:302 Found
  </code></pre>
  
  <p>And its following of the redirect:</p>
  
  <pre><code>Request URL:http://localhost:3000/users/1/edit
  Request Method:GET
  Status Code:404 Not Found
  </code></pre>
  
  <p>So this appears to be that the browser is following the redirect correctly, but rails is ignoring the <code>GET</code> on the redirect call and instead using <code>DELETE</code> which results in 404 (since <code>DELETE</code> is not supported by that resource - which is wrong anyway).</p>
  
  <p>If I simply do a 'GET' on the redirected URL, it works fine.</p>
  
  <p>What am I missing about Rails' redirect after delete? Thanks.</p>