は、私は、次のコードを持っている:Railsの「空白にすることはできません」
<% form_for(@libation) do |f| %>
<%= f.radio_button :carbonated, true %> <%= f.label :carbonated, "Yes" %>
<%= f.radio_button :carbonated, false %> <%= f.label :carbonated, "No" %>
<% end %>
データベース内carbonated
列がタイプtinyint
です。
そして、上記を実行すると、私はNo
をクリックしたときに、私は私に言って大きな赤いボックスを取得:
1 error prohibited this libation from being saved
There were problems with the following fields:
* Carbonated can't be blank
任意のアイデア?
-thanx