This change allows the wrappers to not output their rendered HTML when
when the block yields no content.
e.g. when defining an optional component :
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 :
<%= form.input :name %>
Then the HTML output still contains the wrapper output :
<div class="form-helper -message -help"></div>
If this behaviour is not desired, then the output of the empty tags can
be disabled via the `remove_empty` option.
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.
We are using the html option on wrapper because the wrapper has some
options that are not related to html attributes.
Now you can for example:
```ruby
config.wrappers do |b|
b.wrapper :tag => :td, :class => :some_class, :html => { :additional_html_attribute => :value }
end
```
Thanks @remofritzsche @rafaelfranca @bellthoven