fix return of identity hash in the destroy method #32

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
2 participants
@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

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Apr 17, 2012

Contributor

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

Contributor

justinbmeyer commented Apr 17, 2012

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

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Apr 17, 2012

Contributor

Also why did you change:

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

Contributor

justinbmeyer commented Apr 17, 2012

Also why did you change:

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

@verto

This comment has been minimized.

Show comment
Hide comment
@verto

verto Apr 17, 2012

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

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

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Apr 18, 2012

Contributor

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

Contributor

justinbmeyer commented Apr 18, 2012

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

JupiterJS
Merge pull request #32 from alexisabril/master
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