following a rails tutorial