Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Destroy deleted models

$
0
0
Are you using can.Model? It sounds like you just have a giant Object in memory and are manipulating that. Can you put an example of the code in a jsFiddle (doesn't have to work) just so we can see how you're integrating with Faye?

I would create a new model class that extends can.Model and overwrites all of its static methods (findAll, findOne, create, update, destroy) to work with Faye. The parent object would be stored in the model class and manipulated by the static methods. You'd have to do some event binding in setup so that the stored object got updates from the server.

Viewing all articles
Browse latest Browse all 3491

Trending Articles