title: Single table inheritance and where to use it in Rails
body: <p>I am stuck in a weird Design problem, </p>
  
  <p>I am working on a two type of profiles Models,  </p>
  
  <ul>
  <li>User profile (belongs to User)</li>
  <li>others that are maintain in-site as "bots" (doesn't belong to anybody)</li>
  </ul>
  
  <p>The typical OO behaviour of these two types of Profiles is same but only the  important attributes/properties are common ( the very important ones 5-6 in number), others properties like "interests etc"(almost 10-15 properties) are not there for bot profiles </p>
  
  <p>The coder who worked on this earlier created separate models/Controllers for bot profiles / User profiles which creates a lot of redundancy everywhere and also as expected hard to maintain, write tests etc.I wanted to DRY this up, atleast to solve some/all of these redundancy problems.</p>
  
  <p>Somebody suggested Single Table Inheritance as a solution </p>
  
  <p>Somebody suggested Use Polymorphic Associations instead.</p>
  
  <p>what is the better approach. When do we actually use STI?</p>
  
  <p>My own thought was STI is used best when attributes are same for Models and they differ in behaviour.</p>
  
  <p>Thoughts about what can I do?</p>