I'm using custom parse() methods on both my base collection and base model to handle all the wrapping that my server returns around them.
My problem is that the collection calls parse() on every model too which is not needed, i only need to parse on the model when fetching from the model instead of the collection.
Should i change fetch in some way or is there any other option? I found some comments about a parse = true option but no real documentation on that.
// Base class for all models
module.exports = Backbone.Model.extend({
parse: function(response) {
var retrocycled = JSON.retrocycle(JSON.parse(JSON.stringify(response)));
this.statusResp = retrocycled.status;
this.messageResp = retrocycled.message;
return retrocycled.data;
}
});
My collection does roughly the same in it's parse, but it doesn't really matter what it does, i just need them to only parse when they were the ones fetching i guess.
Thanks!