title: Rails create join table how to validate uniqueness of pair
body: <p>I've created a join table with</p>
  
  <pre><code>rails generate migration CreateJoinTableFoosBars foos bars
  </code></pre>
  
  <p>and it has indeed created a working joining table, however I can't see the model for it and thus I can't add the</p>
  
  <pre><code>validates_uniqueness_of :foo_id, scope: :bar_id
  </code></pre>
  
  <p>How can I do it in this case? Thanks in advance.</p>