<% content_tag("div", :class => "section_with_error" do %> HTML GOES HERE <% end %>
instead of this:
<%= content_tag("div", "HTML GOES HERE", :class => "section_with_error") %>
Put the following code in ApplicationHelper, and you can do just that (replacing "content_tag" in the example above with "block_tag", of course):
def block_tag(tag, options = {}, &block) concat(content_tag(tag, capture(&block), options), block.binding) end