0

I'm using a checkbox in the edit action, and when I go into the form and "check" the box, everything works fine. But then when I go back and try to "uncheck the box" it doesn't seem to save.

Here's my code for the form:

<%= f.label :winning, "Did this Proposal Win?", class: "input-title" %>
<%= f.check_box :winning, {}, true, false %>
4

1 回答 1

2

为什么要提供这组额外参数?这样做:

<%= f.check_box :winning %>

最终 - 尝试使用1and 0,而不是trueand false

于 2012-07-15T22:25:00.143 回答