lundi 24 septembre 2018

Check_box_tag input id

I have a check_box_tag that looks like this :

check_box_tag('shipping_method[shipping_categories][]', category.id, @shipping_method.shipping_categories.include?(category))

When inspecting the output in browser, I have the following :

<input id="shipping_method_shipping_categories_" name="shipping_method[shipping_categories][]" type="checkbox" value="1" />

I don't get why the id has no "id", meaning that the underscore at the end of id="shipping_method_shipping_categories_" makes me expect an id for this particular shipping_category.

Any of you guys and gals have thoughts on this ?

Thanks !




Aucun commentaire:

Enregistrer un commentaire