title: Rails: Validate unique combination of 3 columns
body: <p>Hi I wan't to validate the unique combination of 3 columns in my table.</p>
  
  <p>Let's say I have a table called cars with the values :brand, :model_name and :fuel_type.</p>
  
  <p>What I then want is to validate if a record is unique based on the combination of those 3. An example:</p>
  
  <pre><code>    brand    model_name    fuel_type
      Audi     A4            Gas
      Audi     A4            Diesel
      Audi     A6            Gas
  </code></pre>
  
  <p>Should all be valid. But another record with 'Audi, A6, Gas' should NOT be valid.</p>
  
  <p>I know of this validation, but I doubt that it actually does what I want.</p>
  
  <pre><code>    validates_uniqueness_of :brand, :scope =&gt; {:model_name, :fuel_type}
  </code></pre>