You should use check_box_taginstead f.check_box.
check_box_tag "page[group_ids][]", g.id
The difference is f.check_boxfor forms limited to forms, and the value provided to the checkbox is implicit from this model and does not have to be provided.
source
share