我有一個postgres數據庫與布爾字段:on_farm_tour
。但我的觀點得到這樣的:rails check_box失敗的布爾屬性
undefined method `to_i' for #<Class:0x10ddec5c0>
Extracted source (around line #10):
7:
8: %p
9: =f.label :on_farm_tour, "This farm is in the Farm Tour?"
10: =f.check_box :on_farm_tour
11:
12: %p
13: =f.label :last_mile_directions, 'Enter driving directions from the last point displayed by Google Maps for this farm to the actual location of the farm'
很明顯,我知道true.to_i
是不確定的,但什麼是處理這個正確的方法是什麼?
我們可以看一下表格的開頭,即6個第一行嗎? – christianblais 2011-06-15 20:17:07