rails/rails — pull request #8190 by GBH (2012-11-12 17:26:40+00:00)
Title: Adding suppport for conditional content_tag

This is an attempt to fix this very un-DRY pattern that happens a lot:

```erb
<% if something == true %>
<%= content_tag(:div, :class => 'wrapper') do %>
Content
# ... and more stuff
<% end %>
<% else %>
Content
# ... and more of the same stuff as above
<% end %>
```
Now it's collapsible to this:

```erb
<%= content_tag_if(something == true, :div, :class => 'wrapper') do %>
Content
# ... and more stuff
<% end %>
```

Also added `content_tag_unless` for convenience sake.