Voltrb:无法通过复选框保存属性

时间:2016-05-08 14:20:24

标签: checkbox binding voltrb

我正在尝试一个关于Volt的教程,一个ruby web框架,我有一些问题。

当我尝试将复选框与todo模型绑定时,

<td><input type="checkbox" checked="{{ todo._completed }}" /></td>

当我点击它时,我收到以下消息

[ERROR] task StoreTasks#save in 6.497ms
with args: "todos", ["todos", "[]"], {"label"=>"test", "id"=>"c2519619750f7a73a2438a2f", "completed"=>true}

{:error=>"E11000 duplicate key error collection: todo_app_development.todos index: _id_ dup key: { : \"c2519619750f7a73a2438a2f\" } (11000)"}

我已经按照教程[http://docs.voltframework.com/en/tutorial/todo_functionality.html]

进行了操作

我在这里上传了我的src。 https://github.com/maclarensg/todo_app.git

任何建议都非常感谢。感谢。

1 个答案:

答案 0 :(得分:1)

根据我的经验,重复的密钥错误是使用MongoDB 3.2的结果。你必须将Mongo降级到3.0。

相关问题