Use + to concat html safe elements
This commit is contained in:
parent
eee3daead2
commit
b792c7336c
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue