Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Backbone relational: correct way to destroy model (no http request, client side only)

I need to destroy backbone relational model on client side, without performing any http requests. Under "destroy" word i mean removing model from all collections, removing all relations from other models to current one, and finally, removing all data about current model.

How this can be achieved?

like image 653
avasin Avatar asked Nov 01 '22 15:11

avasin


1 Answers

I'm not sure if this is the correct way of doing it, but I have been using;

Backbone.Relational.store.unregister(model);
like image 195
Cubed Eye Avatar answered Nov 09 '22 05:11

Cubed Eye