Rails3 form_for hidden_field undefined method 'merge'

前端 未结 1 1059
醉酒成梦
醉酒成梦 2021-02-13 10:50

My attempt to place a hidden_field within a form_for is crashing within cucumber on an ActionView helper error. Something also about FixNum which escapes me since I haven\'t dug

1条回答
  •  失恋的感觉
    2021-02-13 11:45

    If you could paste the error message itself, and the relevant lines of the trace, it could help us. Right now, the only thing I see is that the ERB tag before f.hidden_field should be <%=, and I'm not sure about it since I don't use ERB. For what it's worth, merge is usually used with Hash objects. Maybe it can point you in the right direction

    EDIT Ok I get it. You have to write f.hidden_field :commodity_id, :value => @commodity.id.

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