title: RoR | Best Practices when abstracting an Active Record
body: <p>My task is to abstract/inherit an active record class. I'm making a blog where post is a base super with title, slug dates etc... all the redundant stuff you would expect to find. </p>
  
  <p>Here's where things take a turn, I want to sub class out Post into many other sub post types such as audio post, video post, image post, vanilla post. I think you get the point. Obviously each sub type will have their own respective attributes and members. </p>
  
  <ol>
  <li><p>Instead of creating a name, slug, etc., for each sub post type, what is the best practice to inherit or possibly interface the base class? ("I do favor composition over inheritance")</p></li>
  <li><p>Once I figure out how to properly abstract out my models, I would like to then figure out some polymorphic way to say something like Blog.find(1).posts and get an array of all the posts types.</p></li>
  </ol>
  
  <p>I realize that this may not be performance optimal to query all the post types in a polymorphic way so feel free to seguest a better way.</p>