Chapter 2 of Michael Hartl's Rails tutorial