I have this code:
Nodes = new Meteor.Collection("nodes");
[...]
Template.list.events({
'click .toggle': function () {
Session.set("selected_machine", this._id);
Nodes.update(Session.get("selected_machine"), {$set: {"conf" :{"flag": true }}});
}
});
I can't convince meteor to update my entry. Theres a microsecond flash in the DOM, but the server rejects to update.
This is my data: { "_id" : ObjectId("50d8ec4f5919ffef343c9151"), "conf" : { "flag" : false }, "name" : "sepp" }
console.log(Session.get("selected_machine")); shows me the id. Insecure Package is installed. Writing by hand in the minimongo console works as expected.
Is there a Problem because I wan't to update a subarray? What am I doing wrong? Thank you for help