Any example of how to use rails collection_check_boxes in a rails view with a has_many through model with extra attribute?
I need to associate Post with Categories, and I'm using has many through post_categories. I want to add comments the relationship, so I added an extra attribute to the intermediate table, comment, which is a string.
I want to render a form in an admin panel where I am creating a new category and I want to associate it with any existing post, so I use f.collection_check_boxes, but in the same form I also want to add a text box where the user can add any comment when adding the relationship.
How can I do this with rails collection_check_boxes, so that when I submit my associated posts to my new category also I include comments in the same form?