Ruby on Rails Tutorial by Michael Hartl Chapter 2