econsultancy/simple_form — pull request #1 by IanVaughan (2014-05-28 10:29:16+00:00)
Title: Only output the wrapper if the block yeilds content

This removes the rendered HTML for wrappers when the block yeilds 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, in this case an empty `div` tag :
```html

```
With this change, the above template would not output the above HTML.

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