chapter 2 from a rails tutorial