What does Ember Data expect in response to deleting a record?
ember-data, ember.js, ruby-on-rails
Solution
You should send back a 200 with an empty valid json response `{}`, any data returned is applied to the record as if they were attributes.
http://emberjs.jsbin.com/OxIDiVU/215/edit
Additionally you can send back a 204 with no response.
http://emberjs.jsbin.com/OxIDiVU/214/edit
Problem
I'm using Ember Data with the RESTful adapter with a rails backend. When I delete a record from Ember `record.deleteRecord(); record.save()` the `DELETE` request goes to the server and the model is deleted, but this error is printed to the javascript console: ``` Extract requested, but no data given for App.ThisModel. This may cause weird problems. ``` The response from the server was just `render json: true`, so I changed it to `render json: deleted_model` which renders the json for the deleted record. That got rid of the previous error, but now the deleted record is recreated in Ember. What does Ember expect in the response?