Backbone.Model.destroy() does not work the same as in Backbone.js #50

Closed
jDavidnet opened this Issue Nov 14, 2012 · 3 comments

Comments

Projects
None yet
4 participants
@jDavidnet

In backbone.js if you use model.destroy() on an object it should delete it's reference on the server.

In this environment, it does not properly work.

WORKAROUND

model.destroy(model); seems to work in a few cases, if you have not created multiple versions of the model via #48

@zanedev

This comment has been minimized.

Show comment Hide comment
@zanedev

zanedev Dec 11, 2012

maybe im off from what you are describing but i was having this problem until I added the localStorage property to the model as well as the collection like so:

localStorage: new Backbone.LocalStorage("MyStorageCollection")

I was actually getting the "url" is missing error from backbone sync until I did this..

zanedev commented Dec 11, 2012

maybe im off from what you are describing but i was having this problem until I added the localStorage property to the model as well as the collection like so:

localStorage: new Backbone.LocalStorage("MyStorageCollection")

I was actually getting the "url" is missing error from backbone sync until I did this..

@jeromegn

This comment has been minimized.

Show comment Hide comment
@jeromegn

jeromegn Jan 13, 2013

Owner

Please describe how it does and doesn't work like Backbone. Ideally, write a test case to prove it. Else, I'll just fix it myself once I know what it doesn't do right.

Owner

jeromegn commented Jan 13, 2013

Please describe how it does and doesn't work like Backbone. Ideally, write a test case to prove it. Else, I'll just fix it myself once I know what it doesn't do right.

@jeromegn jeromegn closed this Jan 13, 2013

@spenoir

This comment has been minimized.

Show comment Hide comment
@spenoir

spenoir Apr 10, 2015

so is adding the localStorage key to models recommended? It does work but it seems wrong

spenoir commented Apr 10, 2015

so is adding the localStorage key to models recommended? It does work but it seems wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment