Ruby on Rails tutorial from Chapter 4 of "Learning Rails 3"