I had a helluva time figuring out that attempting to output a scriptlet that begins a block segment causes ERB to generate bad ruby code. Here's an example:
1 <%= tag_with_body do %><%end%>
What I really needed was a way to dump the generated ruby code from ERB. Turns out you can. On the last line of my controller action I added the following: