Jeremy, thanks! I tried overriding Model's `parse` in 1.0 but wasn't satisfied because it seems to be called in some cases but not the others. (I can't recall a specific example right now; maybe it was parsing the collection from server, or creating a collection using constructor).
Do you think there are drawbacks to overriding `set`? It seems to work well for me but I'd love to hear your opinion:
Comments
Happy to oblige. There's no built-in convention for it, but you can do something like this:
... assuming that friends is an array of JSON objects suitable to be transformed into Person models.Jeremy, thanks! I tried overriding Model's `parse` in 1.0 but wasn't satisfied because it seems to be called in some cases but not the others. (I can't recall a specific example right now; maybe it was parsing the collection from server, or creating a collection using constructor).
Do you think there are drawbacks to overriding `set`? It seems to work well for me but I'd love to hear your opinion:
https://gist.github.com/gaearon/6689379