plataformatec/simple_form — pull request #1072 by IanVaughan (2014-05-28 11:54:16+00:00)
Title: Only output the wrapper if the block yeilds content

This change allows the wrappers to not output its HTML when when the block yields no content.

e.g. when defining an optional component :
```ruby
ba.wrapper tag: :div, class: 'form-helper -message -hint' do |bb|
bb.optional :hint, wrap_with: { tag: :p }
end
```
and that component is not used in a template :
```erb
<%= form.input :name %>
```
Then the HTML output still contains the wrapper output :
```html

```
If this behaviour is not desired, then the output of the empty tags can be disabled via the `remove_empty` option.
```ruby
ba.wrapper tag: :div, class: 'form-helper -message -hint', remove_empty: true do |bb|
bb.optional :hint, wrap_with: { tag: :p }
end
```
The above config will not output any wrapper HTML.