我正在尝试 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
非常感谢任何建议。谢谢。