diff --git a/lib/simple_form/wrappers/many.rb b/lib/simple_form/wrappers/many.rb index 083ad8b2..dc90a384 100644 --- a/lib/simple_form/wrappers/many.rb +++ b/lib/simple_form/wrappers/many.rb @@ -16,6 +16,7 @@ module SimpleForm @namespace = namespace @components = components @defaults = defaults + @defaults[:tag] = :div unless @defaults.key?(:tag) @defaults[:class] = Array.wrap(@defaults[:class]) end diff --git a/test/form_builder/hint_test.rb b/test/form_builder/hint_test.rb index 200e8f2f..937c1130 100644 --- a/test/form_builder/hint_test.rb +++ b/test/form_builder/hint_test.rb @@ -109,7 +109,7 @@ class HintTest < ActionView::TestCase test 'hint with custom wrappers works' do swap_wrapper do with_hint_for @user, :name, :hint => "can't be blank" - assert_select 'span.omg_hint', "can't be blank" + assert_select 'div.omg_hint', "can't be blank" end end end diff --git a/test/form_builder/wrapper_test.rb b/test/form_builder/wrapper_test.rb index 9fa9cea3..a6bed265 100644 --- a/test/form_builder/wrapper_test.rb +++ b/test/form_builder/wrapper_test.rb @@ -84,7 +84,7 @@ class WrapperTest < ActionView::TestCase assert_select "section.custom_wrapper div.another_wrapper input.string" assert_no_select "section.custom_wrapper div.another_wrapper span.omg_error" assert_select "section.custom_wrapper div.error_wrapper span.omg_error" - assert_select "section.custom_wrapper > span.omg_hint", "cool" + assert_select "section.custom_wrapper > div.omg_hint", "cool" end end diff --git a/test/support/misc_helpers.rb b/test/support/misc_helpers.rb index 7ab0ab76..451aae5c 100644 --- a/test/support/misc_helpers.rb +++ b/test/support/misc_helpers.rb @@ -42,7 +42,7 @@ module MiscHelpers b.wrapper :error_wrapper, :tag => :div, :class => "error_wrapper" do |be| be.use :error, :wrap_with => { :tag => :span, :class => "omg_error" } end - b.use :hint, :wrap_with => { :tag => :span, :class => "omg_hint" } + b.use :hint, :wrap_with => { :class => "omg_hint" } end end