Skip to content

Commit

Permalink
don’t omit the id
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias Schreck committed Feb 7, 2014
1 parent f6a75f5 commit c3a7548
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shared/syncer.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function serverSync(method, model, options) {
};

if (verb === 'POST' || verb === 'PUT') {
api.body = _.omit(model.toJSON(), model.idAttribute);
api.body = model.toJSON();
}

req.dataAdapter.request(req, api, function(err, response, body) {
Expand Down
2 changes: 1 addition & 1 deletion test/shared/syncer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('syncer', function() {
path: '/listings/0',
query: {},
api: 'foo',
body: { foo: 'bar', bar: 'foo' }
body: { id: 0, foo: 'bar', bar: 'foo' }
};

model.set('foo', 'bar');
Expand Down

0 comments on commit c3a7548

Please sign in to comment.