addon/active-model-serializer.js
function(snapshot, json, relationship) {
    var key = relationship.key;
    var belongsTo = snapshot.belongsTo(key);
    var jsonKey = underscore(key + "_type");

    if (Ember.isNone(belongsTo)) {
      json[jsonKey] = null;
    } else {
      json[jsonKey] = classify(belongsTo.modelName).replace('/', '::');
    }
  }
function(snapshot, json, relationship) {
    var key = relationship.key;
    var belongsTo = snapshot.belongsTo(key);
    var jsonKey = underscore(key + "_type");

    if (Ember.isNone(belongsTo)) {
      json[jsonKey] = null;
    } else {
      json[jsonKey] = classify(belongsTo.modelName).replace('/', '::');
    }
  }
function ( snapshot , json , relationship ) { var key = relationship . key ; var belongsTo = snapshot . belongsTo ( key ) ; var jsonKey = underscore ( key + "_type" ) ; if ( Ember . isNone ( belongsTo ) ) { json [ jsonKey ] = null ; } else { json [ jsonKey ] = classify ( belongsTo . modelName ) . replace ( '/' , '::' ) ; } }
Serializes a polymorphic type as a fully capitalized model name.

@method serializePolymorphicType
@param {DS.Snapshot} snapshot
@param {Object} json
@param {Object} relationship
Serializes a polymorphic type as a fully capitalized model name .