我用mongodb作爲我的數據庫和驅動程序mongoid。如何在Mongoid中爲datetime_select helper使用update_attributes?
我的一個模型Bill
有一個字段是LOCAL_TIME,我用datetime_select的觀點:
.ym-fbox-select
= f.label :local_time, "Time"
= f.datetime_select :local_time
的create
行動確定。但update
行動不是。 錯誤是這樣的:
(eval):1: syntax error, unexpected tINTEGER, expecting ')'
def local_time(1i)=(value)
和update
是:
def update
@bill = Bill.find(params[:id])
respond_to do |format|
if @bill.update_attributes(params[:bill])
所以我想知道如何更新local_time
場?
該鏈接未找到! –