title: ActiveRecord - :belongs_to multiple classes. Reconfiguring behavior
body: <p>I have built the following but without using the Rails Model. 
  I have following models without any specified relations to each other. 
  Tale
  Purpose
  Culture
  Moral
  Value
  Book
  Keyword
  Character</p>
  
  <p>I am manually storing all the relationship info as arrays in a single relations table with structure as follows
  <img src="https://i.stack.imgur.com/1nySV.jpg" alt="for is the table name / model name pluralized and for_id is the object  id"></p>
  
  <p>What I would like to do is something like this - 
      Model: 
      Tale -> has_many: :tale_relations
      Purpose -> has_many: :tale_relations
      Culture -> has_many: :tale_relations
      Morals -> has_many: :tale_relations
      Values -> has_many: :tale_relations
      Books -> has_many: :tale_relations
      Keywords -> has_many: :tale_relations
      Characters -> has_many: :tale_relations</p>
  
  <pre><code>Model: TaleRelation -&gt;
  belongs_to: :tale
  belongs_to: :purpose
  belongs_to: :culture
  belongs_to: :morals
  belongs_to: :values
  belongs_to: :books
  belongs_to: :keywords
  belongs_to: :characters
  </code></pre>
  
  <p>But would not like the tale_relations table to have multiple columns for each of these different models
  I mean i do not want tale_id, purpose_id, moral_id and so on (8 such columns)
  Want to be able to identify the records through the table name (:for column) and id # (:for_id column). </p>
  
  <p>currently it is working manually, but just thought the code code really become clean and simple and actually extendible if i can get this working. with just two columns any relationship can be identified.</p>