Sign in through GitHub

RailsCasts Pro episodes are now free!

Learn more or hide this

STI and Polymorphic Associations

#394 STI and Polymorphic Associations pro

Nov 25, 2012 | 14 minutes | Active Record, Refactoring
Single Table Inheritance (STI) can help organize branching logic into separate classes, but a polymorphic association may be a better fit if there are unique database columns.
  • Download:
  • source codeProject Files in Zip (112 KB)
  • mp4Full Size H.264 Video (29.5 MB)
  • m4vSmaller H.264 Video (15.8 MB)
  • webmFull Size VP8 Video (19.7 MB)
  • ogvFull Size Theora Video (33.8 MB)