Follows RailsTutorial section 3