In Rails ERB, you can suppress newlines by adding a trailing hyphen to tags:
<% for @item in @items -%> <%= @item %>
{% spaceless %} apple banana cacao {% endspaceless %}
I am not aware about any way to discard template tags lines. I'd vote for opening bug report.