Use + to concat html safe elements

This commit is contained in:
Carlos Antonio da Silva 2012-01-31 15:57:45 -02:00
parent eee3daead2
commit b792c7336c
2 changed files with 3 additions and 3 deletions

View File

@ -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.

View File

@ -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
}