example codes in rails tutorial