You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a collection is explicitly given to radio-buttons and one of the values is nil, the generated for label for the nil one does not match its corresponding id with a difference of a single underscore character. For example,
<fieldsetclass="form-group radio_buttons model_my_method"><legendclass="col-form-label pt-0">ABC</legend><inputtype="hidden" name="model[my_method]" value="" autocomplete="off" /><!-- Valid one for "true" --><divclass="form-check"><inputclass="form-check-input radio_buttons required" type="radio" value="true" name="model[my_method]"
id="model_my_method_true" /><labelclass="form-check-label collection_radio_buttons"
for="model_my_method_true">Yes</label></div><!-- Invalid one for "nil" --><divclass="form-check"><inputclass="form-check-input radio_buttons required" type="radio" checked="checked" name="model[my_method]"
id="model_my_method" /><labelclass="form-check-label collection_radio_buttons"
for="model_my_method_">Undefined</label></div>
The second pair of input and label corresponds to the nil-parameter. As you see, the for has a trailing _, whereas that for id does not, and so they are not consistent.
Expected behavior
The label and corresponding ID values must exactly agree.
The text was updated successfully, but these errors were encountered:
Environment
Current behavior
When a collection is explicitly given to radio-buttons and one of the values is
nil
, the generatedfor
label for thenil
one does not match its correspondingid
with a difference of a single underscore character. For example,for
Model
generatesThe second pair of
input
andlabel
corresponds to thenil
-parameter. As you see, thefor
has a trailing_
, whereas that forid
does not, and so they are not consistent.Expected behavior
The label and corresponding ID values must exactly agree.
The text was updated successfully, but these errors were encountered: