How do you set a custom id when using a check_box_tag helper in rails?
I have a loop which creates a bunch of checkboxes based on a collection:
- subject
HAML sample
Lets say you have a print
object somewhere with a framed
attribute, you have to display a list of prints
so inside the loop you will create a custom row
and column
with unique id on each checkbox
for updating framed
.input.row.collapse
= check_box_tag :framed, print.framed, nil, { id: "framed_#{print.id}" }