Chapter3 of rails tutorial