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

Voltrb: Unable to save attribute through checkbox

我正在试用 Volt 的教程,这是一个 ruby 网络框架,我遇到了一些问题。

当我尝试将复选框与待办事项模型绑定时,

<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

非常感谢任何建议。谢谢

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