Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

undefined method `merge' for 2:Fixnum

i get the following error

undefined method `merge' for 2:Fixnum

for the code

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

please, suggest solution for this.

thanks

like image 519
lamrin Avatar asked Jan 18 '11 06:01

lamrin


1 Answers

You should use check_box_tag instead of f.check_box.

check_box_tag "page[group_ids][]", g.id

The difference is f.check_box is for model-bounded forms and the value supplied to the check box is implicit from the given model and doesn't need to be provided.

like image 99
PeterWong Avatar answered Oct 17 '22 19:10

PeterWong