serialize (deserialized, options)
When given a deserialized value from a record attribute this method must return the serialized value.
Example
serialize: function(deserialized, options) { return Ember.isEmpty(deserialized) ? null : Number(deserialized); }
Parameters:
- deserialized
- The deserialized value
- options
- hash of options passed to `DS.attr`
Returns:
- The serialized value
Please login to continue.