title: Chaining active record queries together
body: <p>I have a search form which contains parameters such as city,building_type,min_price,max_price. </p>
  
  <p>What is the best way to chain all those queries together. If the user doesn't set a parameter, I want it to just return all records.</p>
  
  <p>Something like </p>
  
  <pre><code>city=params[:city] || "all"
  building_type=params[:building_type] || "all"
  min_price=params[:min_price] || "all"
  
  @results= Property.where(city: city,building_type: building_type,min_price: min_price)
  </code></pre>
  
  <p>Is it possible to do something like this? Seeing that there is no "all" keyword.</p>