heartcombo--simple_form/test
Ian Vaughan 21d03ff583 Only output the wrapper if the block yields content
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.
2014-05-29 10:25:16 +01:00
..
action_view_extensions improve action_view_extensions's tests description and remove 'should' 2014-05-14 14:17:54 -03:00
components improve components's tests description and remove 'should' 2014-05-14 14:18:18 -03:00
form_builder Only output the wrapper if the block yields content 2014-05-29 10:25:16 +01:00
generators Update the tests 2014-03-21 15:46:08 -03:00
inputs improve inputs's tests description and remove 'should' 2014-05-14 14:19:06 -03:00
support Only output the wrapper if the block yields content 2014-05-29 10:25:16 +01:00
simple_form_test.rb Warn users if Simple Form is not configured in the application 2014-04-02 18:30:54 -03:00
test_helper.rb Configure the url helpers correctly 2014-03-10 15:18:49 -03:00