title: has_many polymorphic relationship where our _type field is an int?
body: <p>We have an app in Rails 4 (but soon to be Rails 5) that has a polymorphic log class that we inherited from a Django app.</p>
  
  <p>In a traditional polymorphic relation, the objects would have source_type and source_id, which would be things like <code>'some_class'</code> and <code>123</code>. </p>
  
  <p>In our little model, we have <code>content_type</code> and <code>content_id</code> which unfortunately map to two ints, where the int in <code>content_type</code> further points to a <code>ContentType</code> model that -- to further complicate things -- dont map to Rails-ey types (<code>'some_type'</code> but rather django-ey <code>'some type class'</code>. </p>
  
  <p>It's a mess.</p>
  
  <p>Is there any way to override the value used in looking in a polymorphic association (e.g. instead of using <code>'some_class'</code>, use <code>11</code>) -- but just for the association? There is an answer for a <a href="https://stackoverflow.com/questions/6131311/polymorphic-assocations-using-integer-id-type-fields">problem somewhat similar</a> to ours, but it is 4 years old and it overrides association_class. We still use some of this strange Django voodoo elsewhere in our codebase, so overrides feel like they'd cause more problems than solve. </p>