Chapter three of Hartl's Ruby on Rails tutorial