serializePolymorphicType (snapshot, json, relationship)
Defined in addon/serializers/json.js:1255
You can use this method to customize how polymorphic objects are serialized. Objects are considered to be polymorphic if { polymorphic: true } is pass as the second argument to the DS.belongsTo function. Example app/serializers/comment.js
import DS from 'ember-data';
export default DS.JSONSerializer.extend({
serializePolymorphicType: function(snapshot, json, relationship) {
var key = re