title: In ruby on rails how do I pass an array as a series of parameters
body: <p>I have a simple query that I'm attempting to construct.
  <br>I want to pass in parameters to the query.</p>
  
  <pre><code>Product.where('id = ?', 1)
  </code></pre>
  
  <p>Easy as right.. 
  What to do if the field list and the values are arrays</p>
  
  <pre><code>fields = ['id = ? ', 'type_id = ?', 'brand_id = ?']
  values = [1, 1, 1]
  Product.where(fields.join(' and '), values)  #does not compute, does not compute!
  </code></pre>
  
  <p>Anyone know how to pass in the values for a parametrized query?</p>