title: Dynamic query in rails where condition
body: <p>How can we get a dynamic query in Rails such that we can only search the field that is present in the array with AND operator? Example: </p>
  
  <pre><code>car_type = ['tow', 'drive']
  Vehicle.where("tow=? AND drive=?", true, true)
  
  car_type = ['tow']
  Vehicle.where("tow=?", true)
  </code></pre>