Input as radio_buttons: `label: false` not working but `label: ""` does.

Author: ghostCreated Aug 17, 2022Updated Nov 18, 2022

Environment

  • Ruby 3.1.0
  • Rails 7.0.3.1
  • Simple Form 5.1.0

Current behavior

<%= f.input :change_nature_quebec,
            as: :radio_buttons,
            collection: [[bool_to_text(true), true] ,[bool_to_text(false), false]],
            wrapper: :vertical_collection_inline,
            label: false %>

[BAD]=> Will display "Change nature quebec" as label

<%= f.input :change_nature_quebec,
            as: :radio_buttons,
            collection: [[bool_to_text(true), true] ,[bool_to_text(false), false]],
            wrapper: :vertical_collection_inline,
            label: "" %>
[GOOD]=> Will not display a label

Expected behavior

To never show the label when the value is false.