Permalink
Browse files

`id` in param wins over `id` in request body.

  • Loading branch information...
1 parent 661e3b3 commit c61d5e6b4b56c18e2a8f8801469582234b87ccf8 @willwhite willwhite committed Jan 4, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 servers/Route.bones
View
@@ -131,6 +131,8 @@ server.prototype.getModel = function(req, res, next) {
server.prototype.saveModel = function(req, res, next) {
if (!req.model) return next();
+ // `id` in param wins over `id` in request body.
+ if (req.params.id) req.body.id = req.params.id;
req.model.save(req.body, {
success: function(model, resp) {
res.send(resp, headers);

0 comments on commit c61d5e6

Please sign in to comment.