Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix return of identity hash in the destroy method #32

Closed
wants to merge 3 commits into from

Conversation

verto
Copy link

@verto verto commented Apr 17, 2012

Scenario:

var Todo = can.Model({
destroy : "DELETE /todos/{id}",
},{});

todo = new Todo({id: 1});
todo.destroy();

The problem occurs because the return of identity hash into AjaxMethods.destroy return only id. so, when ajax method tries to fill values in the url, the id is filled with undefined value.

@justinbmeyer
Copy link
Contributor

Thanks! Is there a test you can add to this?

@justinbmeyer
Copy link
Contributor

Also why did you change:

if ( instancesRawData instanceof this.List ) {
var ml = (instancesRawData instanceof ML);

@verto
Copy link
Author

verto commented Apr 17, 2012

@justinbmeyer that changes was done by @ralphholzmann in the master. i'm sorry, i've forgot to update from jupiterjs/canjs. :(

@justinbmeyer
Copy link
Contributor

I'm not sure, but it looks like the formatting is off.

thecountofzero pushed a commit to thecountofzero/canjs that referenced this pull request Jun 14, 2012
WearyMonkey pushed a commit to WearyMonkey/canjs that referenced this pull request Dec 31, 2012
Addresses issue with the propagation of the resize "event"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants