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
Updating records: /put doesn't send record id #1548
Comments
Shouldn't the api call be something like /customer/:id ? And you can pull On 5 December 2013 14:50, Peter Göbel notifications@github.com wrote:
|
Oh my god, sorry, I have to take a break now :) |
Well, some existing APIs need the ID to come in, and I'd rather not proxy the request. Is it possible to make this an extend() option on |
@otac0n The easiest way to force Ember Data to always include the id would be to extend the App.ApplicationSerializer = DS.RESTSerializer.extend({
serialize: function(record, options) {
options = options || {includeId: true};
return this._super(record, options);
}
}); |
I'm trying to update records over my API, but Ember doesn't send the ID of the record.
I'm using Ember 1.2.0 and Ember Data 1.0.0 Beta 4
Thats my code:
Now Ember sends a
put
request to my API, but sends this data only:But my API needs the ID to update the correct record. Shouldn't Ember Data always include the ID when sending
put
requests?The text was updated successfully, but these errors were encountered: