Looks like all you changed was the formatting, but I think this would be better extracted into a method as opposed to a block.