Include ID in PUT request


#1

Is there an easy way to include a model’s ID in the snapshot data send with a PUT request to the server?

record: {
  id: "my-awesome-id",
  ...
}

I’ve read that you can overwrite the updateRecord of the adapter, just as descripted in the documents. But I run in some authentication issues, and even than, it’s just ugly to overwrite the updateRecord method in every project just to only include an ID.


#2

You can override serialize and just set includeId = true in the options hash: http://emberjs.com/api/data/classes/DS.JSONSerializer.html#method_serialize