---
title: 'Ruby Science: Inheritance, Composition, STI, and Polymorphic Associations'
teaser:
tags: web,ruby,rails
author: Joe Ferris
published_on: 2013-02-08
---

Todays' release of [Ruby Science](http://rubyscience.com?utm_source=giantrobots&utm_medium=blog&utm_campaign=newchapters)
includes two new chapters. If you're already reading Ruby Science, make sure to
log into GitHub and download the latest version.

In this week's updates, we cover composition and inheritance. You'll learn about
the uses and drawbacks of Single Table Inheritance (<abbr title="Single Table
Inheritance">STI</abbr>), as well as how to convert an <abbr title="Single Table
Inheritance">STI</abbr> hierarchy to use composition through polymorphic
associations.

The book is a work in progress, and currently contains around 104 pages of
content. A $49 purchase gets you access to the current release of the book, all
future updates, and the companion example application. In addition, purchasers
have the ability to send thoughtbot their toughest Ruby, Rails, and refactoring
questions.

[Get your copy of Ruby Science today.](http://rubyscience.com?utm_source=giantrobots&utm_medium=blog&utm_campaign=newchapters)
