serialize (snapshot, options) Object
Proxies to the serializer's serialize
method.
Example
app/adapters/application.js
import DS from 'ember-data'; export default DS.Adapter.extend({ createRecord: function(store, type, snapshot) { var data = this.serialize(snapshot, { includeId: true }); var url = `/${type.modelName}`; // ... } });
Parameters:
-
snapshot
DS.Snapshot
-
options
Object
Returns:
-
Object
- serialized snapshot
Please login to continue.