code from the rails-girls meetup