heartcombo / simple_form

Forms made easy for Rails! It's tied to a simple DSL, with no opinion on markup.
http://blog.plataformatec.com.br/tag/simple_form
MIT License
8.22k stars 1.32k forks source link

fix build_hidden_field_for_checkbox not returning ActiveSupport::SafeBuffer instance. #1703

Closed tfmcloughlin closed 2 years ago

tfmcloughlin commented 4 years ago

Returning a normal string here would result in raw html displaying on the final page, instead of the actual form. This fix ensure a ActiveSupport::SafeBuffer

nashby commented 2 years ago

@tfmcloughlin thanks! I added a test case here https://github.com/heartcombo/simple_form/commit/21148b319bc9740af7580ecc44826df7bf5c5fcc