An exercise from Michael Hartl's Rails Tutorial.