Review, please: Capture block so content won't leak.

The [following pull request](https://github.com/rails/rails/pull/8916) fixed
the block being passed to the appropriate helper method. However, the content
being passed into the block is generating repeated markup on the page due to
some weird ERb evaluation.

This commit tries to capture the block's generated output so the page isn't
flooded with markup, but I'm not able to make the tests pass due to a missing
output buffer. Please help me review this behavior.