From the Hartl Rails Tutorial.