title: Complete form POST after redirect to sign in page and sign in
body: <p>i have a form, on submit i check if the user is logged in, if not, I redirect to the signin page, once they sign in I want to complete the form POST that they were attempting. Any ideas on how to do this?</p>
  
  <p>So far I have attempted storing the request path in a cookie and redirecting back using this path but on redirect it treats it as a GET rather than a POST which is not correct.</p>
  
  <pre><code>def store_location
    session[:return_to] = request.fullpath
  end
  
  def redirect_back_or(default)
    redirect_to(session[:return_to] || default)
    clear_return_to
  end
  </code></pre>