Undefined `merge 'method for 2: Fixnum

I get the following error

undefined `merge 'method for 2: Fixnum

for code

f.check_box "page[group_ids][]", g.id

Please suggest a solution for this.

thank

+5
source share
1 answer

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.

+22
source

All Articles