undefined method `merge' for 2:Fixnum

前端 未结 1 1261
名媛妹妹
名媛妹妹 2020-12-06 19:33

i get the following error

undefined method `merge\' for 2:Fixnum

for the code

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

ple

相关标签:
1条回答
  • 2020-12-06 19:53

    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.

    0 讨论(0)
提交回复
热议问题