Chapter 3 of Ruby on Rails Tutorial, Foo.