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
Leito,
Just to close the loop, I gave up trying to pass an object type indicator in through check_box_tag. Every parameter I added to the syntax shown in my last post above (below??) simply caused the checkbox state to default to checked rather than unchecked, without passing any additional data to the controller.
While remaining alert to alternative solutions as they present themselves, for the time being I incorporate the object type into the submit_tag value. This ties the functionality to the display, since the submit_tag value is what's shown to the user on the submit button, but it could be argued that this forces clarity into the view even as it provides needed disambiguation to the controller.
Learning day by day...