title: Rails table association with ENUM column
body: <p>Given the table <code>uploads</code> which holds the relation between 4 different apps and users:</p>
  
  <pre><code>field    type
  dogTag   int (foreign key to dvd)
  app      enum
  uploader int (foreign key to user)
  mod      string
  ...
  </code></pre>
  
  <p>And the table <code>dvds</code>:</p>
  
  <pre><code>dogTag  int (primary key)
  title   string
  ...
  </code></pre>
  
  <p>And the table <code>users</code>:</p>
  
  <pre><code>id    int (primary key)
  ...
  </code></pre>
  
  <p>How can I properly construct a model relations between the <code>dvds</code> table and the <code>uploads</code> table within Rails if it depends on an ENUM column? </p>
  
  <p>With sql I simply do:</p>
  
  <pre><code>JOIN uploads ON uploads.dogTag = dvds.dogTag
  WHERE uploads.app = 'dvd'
  </code></pre>
  
  <p>But have no idea how to create this relationship in Rails and haven't found a lot of info on this. </p>
  
  <p>Thanks</p>