Chapter 2 from Michael Hartl's Ruby on Rails Tutorial