Merge pull request #1703 from tfmcloughlin/master

fix build_hidden_field_for_checkbox not returning ActiveSupport::SafeBuffer instance.
This commit is contained in:
Vasiliy Ermolovich 2022-02-20 20:22:14 +03:00 committed by GitHub
commit 515db9acb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ module SimpleForm
# 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)