chapter 3 in Michael Hartl's ruby on rails tutorial