exercise from the learn-rails pdf