title: Rails - Parameter with multiple values in the URL when consuming an API via Active Resource
body: <p>I am consuming an API that expects me to do requests in the following format:</p>
  
  <pre><code>?filter=value1&amp;filter=value2
  </code></pre>
  
  <p>However, I am using Active Resource and when I specify the <strong>:params</strong> hash, I can't make the same parameter to appear twice in the URL, which I believe is correct.  So I can't do this:</p>
  
  <p><code>:params =&gt; {:consumer_id =&gt; self.id, :filter =&gt; "value1", :filter =&gt; "value2" }</code>, because the second filter index of the hash will be ignored.</p>
  
  <p>I know I can pass an array (which I believe is the correct way of doing it) like this:</p>
  
  <pre><code>:params =&gt; {:consumer_id =&gt; self.id, :filter =&gt; ["value1","value2"] }
  </code></pre>
  
  <p>Which will produce a URL like:</p>
  
  <pre><code>?filter[]=value1&amp;filter[]=value2
  </code></pre>
  
  <p>Which to me seems ok, but the API is not accepting it.  So my question are:</p>
  
  <p>What is the correct way of passing parameters with multiple values? Is it language specific? Who decides this? </p>