Skip to content

Commit

Permalink
fix build_hidden_field_for_checkbox not returning html_safe string in…
Browse files Browse the repository at this point in the history
… some instances
  • Loading branch information
Tom McLoughlin committed May 30, 2020
1 parent afda7b8 commit 75a2766
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/simple_form/inputs/boolean_input.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def build_check_box_without_hidden_field(options)
# we need the hidden field to be *outside* the label (otherwise it
# generates invalid html - html5 only).
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[:name] = input_html_options[:name] if input_html_options.key?(:name)
options[:form] = input_html_options[:form] if input_html_options.key?(:form)
Expand Down

0 comments on commit 75a2766

Please sign in to comment.