Chapter 2 from the Ruby on Rails tutorial, by Michael Hartl. www.railstutorial.com