Skip to content

Instantly share code, notes, and snippets.

@Samsinite
Created Jan 26, 2015
Embed
What would you like to do?
Array transform for ember-data
import Ember from 'ember';
import DS from 'ember-data';
export default DS.Transform.extend({
serialize: function(deserialized) {
return !!deserialized ? deserialized.toArray() : null;
},
deserialize: function(serialized) {
return Ember.A(serialized);
}
});
@vasilakisfil
Copy link

vasilakisfil commented Feb 9, 2016

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment