title: Passing param values to redirect_to as querystring in rails
body: <p>This should be simple, but I can't seem to find an easy answer.</p>
  
  <p>How can I pass param values from the current request into a redirect_to call?  I have some form values I'd like to pass into the query string of a GET redirect</p>
  
  <p>I'd like to do something like:</p>
  
  <pre><code>redirect_to @thing, :foo =&gt; params[:foo]
  </code></pre>
  
  <p>and get sent to:</p>
  
  <pre><code>http://things/4?[foo][key1]=val1&amp;[foo][key2]=val2
  </code></pre>
  
  <p>Thanks!</p>
  
  <p>Also - how could this be handled for a redirect_to :back?</p>
  
  <pre><code>redirect_to :back, :foo =&gt; params[:foo]
  </code></pre>