You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 11, 2018. It is now read-only.
when i call .destroyResource() in an Em.Resource object, it fires the function 2 times, so generates 2 DELETE xhr requests.
I checked the button that fires the function that calls destroyResource, and its ok, calling it just one time, so i think it might be a issue with ember-rest.js. Any clue?
This doesn't seem to be a general problem with ember-rest. But please make sure you're using the latest version.
You're calling object.destroyResource() from within this.$("div:first-child").slideUp(). Perhaps div:first-child is selecting more than one element? Try calling destroyResource() directly and set a breakpoint and step through it if you're still seeing the problem.
Also, to follow convention when extending ember classes, start the names with caps (e.g. App.User). Objects like App.users start with lower case.
Right on the spot! The slideUp function is the one thats is being called two times, i would not expect it being called 2 times as i'm using first-child, but its selecting 2 elements. And thanks for the advise in the conventions!
when i call .destroyResource() in an Em.Resource object, it fires the function 2 times, so generates 2 DELETE xhr requests.
I checked the button that fires the function that calls destroyResource, and its ok, calling it just one time, so i think it might be a issue with ember-rest.js. Any clue?
the code:
The text was updated successfully, but these errors were encountered: