copy response into resource on save. update jstestdriver

This commit is contained in:
Adam Abrons
2010-03-15 15:02:52 -07:00
parent e3565dfea6
commit f9f181a33e
2 changed files with 5 additions and 1 deletions

Binary file not shown.

View File

@@ -107,7 +107,11 @@ ResourceFactory.prototype = {
default:
throw "Expected between 1-3 arguments [params, data, callback], got " + arguments.length + " arguments."
}
Resource[name](params, this, callback);
var self = this;
Resource[name](params, this, function(response){
copy(response, self);
callback(self);
});
};
}
});