fix build_hidden_field_for_checkbox not returning html_safe string in some instances
This commit is contained in:
parent
afda7b87b1
commit
75a2766632
|
@ -60,7 +60,7 @@ module SimpleForm
|
||||||
# we need the hidden field to be *outside* the label (otherwise it
|
# we need the hidden field to be *outside* the label (otherwise it
|
||||||
# generates invalid html - html5 only).
|
# generates invalid html - html5 only).
|
||||||
def build_hidden_field_for_checkbox
|
def build_hidden_field_for_checkbox
|
||||||
return "" if !include_hidden? || !unchecked_value
|
return "".html_safe if !include_hidden? || !unchecked_value
|
||||||
options = { value: unchecked_value, id: nil, disabled: input_html_options[:disabled] }
|
options = { value: unchecked_value, id: nil, disabled: input_html_options[:disabled] }
|
||||||
options[:name] = input_html_options[:name] if input_html_options.key?(:name)
|
options[:name] = input_html_options[:name] if input_html_options.key?(:name)
|
||||||
options[:form] = input_html_options[:form] if input_html_options.key?(:form)
|
options[:form] = input_html_options[:form] if input_html_options.key?(:form)
|
||||||
|
|
Loading…
Reference in New Issue