I've been Googling for a while now, but haven't found any good solution.
The root of the problem is that my records aren't being set to isDirty
when using this method:
DS.JSONTransforms.object = {
deserialize: function(serialized) {
return Ember.isNone(serialized) ? {} : serialized;
},
serialize: function(deserialized) {
return Ember.isNone(deserialized) ? {} : deserialized;
}
}
From what I gather this is an old method that apparently still works, since it handles the JSON objects I'm throwing at it, but it's not setting my records to isDirty
when making edits.
What you now should be using is registerTransform
on your adapter (according to this https://github.com/emberjs/data/issues/517). But my custom transform isn't being registered, so I guess I'm putting it at the wrong place (same place as my previous JSONTransforms).
DS.RESTAdapter.registerTransform('object', {
deserialize: function(serialized) {
return Em.none(serialized) ? {} : serialized;
},
serialize: function(deserialized) {
return Em.none(deserialized) ? {} : deserialized;
}
});
Any one have knowledge to share about this?