Refactor code in Listing 6.20

Hi Michael,

I'm new to Ruby, Rails, git and GitHub, and I've been learning in leaps and bounds from your book.

I'm not sure if you accept pull requests for it, but I found a place where two lines could be refactored into one, building upon prior knowledge. I tried to respect your formatting as much as possible, too.

Either way, this would be my first pull request and attempted contribution. I'd appreciate any tips if I did something wrong.

Thanks for your time,
Andrei