what's the best approach to updating an element in the content property of an ArrayController so that any associated views are updated.
Currently, i use the following piece of code, which updates the content but not the view
updateContent: function(device) {
for (var index = 0; index < this.content.length; index++) {
if (this.content[index]._id === device._id) {
this.content.splice(index, 1, device);
break;
}
}
}
What's the best approach for doing this?
In this particular case I am receiving calls from the server, using soket.io, as the state of devices change on updating the view accordingly.