Chapter 2 from Ruby on Rails 3 Tutorial: Michael Hartl