title: how to parse multivalued field from URL query in Rails
body: <p>I have a URL of form <code>http://www.example.com?foo=one&amp;foo=two</code></p>
  
  <p>I want to get an array of values <code>['one', 'two']</code> for <code>foo</code>, but <code>params[:foo]</code> only returns the first value.</p>
  
  <p>I know that if I used <code>foo[]</code> instead of <code>foo</code> in the URL, then <code>params[:foo]</code> would give me the desired array.</p>
  
  <p>However, I want to avoid changing the structure of the URL if possible, since its form is provided as a spec to a client application. is there a good way to get all the values without changing the parameter name?</p>