我知道这个问题很简单,但我还不能解决。可能你们的眼睛比我还敏锐。
我有select_tag
哪个:
<%= f.select :product_type, options_for_select([["Raw Material", "0"], ["Semi Material", "1"], ["Finish", "2"]], @product.product_type,), { :prompt => "Select Product Type" }, :required => true %>
一个简单select_tag
但它总是返回wrong number of arguments (0 for 1)
我尝试从我的另一个select_tag
非常相似的页面复制粘贴,并在它的页面上完美运行,但仍然在此页面上返回该错误。
我尝试将代码破坏为:
33. <%= f.select :product_type, options_for_select([["Raw Material", "0"],
34. ["Semi Material", "1"],
35. ["Finish", "2"]],
36. @product.product_type,
37. ), { :prompt => "Select Product Type" }, :required => true %>
它在行上返回错误36
。
我不知道为什么让它不起作用。谢谢