Exercise from "Learn Ruby on Rails" by Daniel Kehoe