- Radio buttons behave strangely when they have no ‘value’ attribute. If you had a form containing a tag like this:
<input type="radio" name="foo" /> (no value attribute),
and you selected that radio button, then the POST data will contain
foo=on. The default value is not an empty string, but the word “on”.
You might run into this problem using rails form helpers. If you pass a
nil value to ActionView’s
radio_button_tag method, it will render a tag without a ‘value’ attribute, so the string “on” might show up in your params.