I'm using the code shown below to save a new record in Ember-Model.
var saveResult = this.get('model').save();
saveResult.then (function(value) {$('#statusArea').html('Save succedded.\n'),
function(value) {$('#statusArea').html('Save failed.\n')});
Everything worked as expected on the server side. I can see the correct 'post' message coming across, and able to save the data to the DB. But no matter what status I return from the server (I've tried 200, 201, and 204), the promise always falls to the failed routine. I have two questions:
1) Am I using the Ember.RSVP.promise returned from Ember-Model correctly in the code shown above?
2) If yes, what do I have to return from the server to reflect success? I have full control on the server side, and can basically return anything necessary.