diff --git a/lib/simple_form/action_view_extensions/builder.rb b/lib/simple_form/action_view_extensions/builder.rb index e888575c..28cc8323 100644 --- a/lib/simple_form/action_view_extensions/builder.rb +++ b/lib/simple_form/action_view_extensions/builder.rb @@ -142,7 +142,7 @@ module SimpleForm # server if all checkboxes are unchecked. hidden = template.hidden_field_tag("#{object_name}[#{attribute}][]", "", :id => nil) - wrap_rendered_collection(rendered_collection << hidden, options) + wrap_rendered_collection(rendered_collection + hidden, options) end # Wrapper for using simple form inside a default rails form. diff --git a/lib/simple_form/inputs/boolean_input.rb b/lib/simple_form/inputs/boolean_input.rb index 9e07d9ca..5f30e53e 100644 --- a/lib/simple_form/inputs/boolean_input.rb +++ b/lib/simple_form/inputs/boolean_input.rb @@ -3,7 +3,7 @@ module SimpleForm class BooleanInput < Base def input if nested_boolean_style? - build_hidden_field_for_checkbox << + build_hidden_field_for_checkbox + template.label_tag(nil, :class => "checkbox") { build_check_box_without_hidden_field } @@ -16,7 +16,7 @@ module SimpleForm if options[:label] == false input elsif nested_boolean_style? - build_hidden_field_for_checkbox << + build_hidden_field_for_checkbox + @builder.label(label_target, label_html_options) { build_check_box_without_hidden_field + label_text }