DS.Store#normalize()

normalize (modelName, payload) Object

Defined in addon/-private/system/store.js:2271

normalize converts a json payload into the normalized form that push expects.

Example

socket.on('message', function(message) {
  var modelName = message.model;
  var data = message.data;
  store.push(store.normalize(modelName, data));
});

Parameters:

modelName String
The name of the model type for this payload
payload Object

Returns:

Object
The normalized payload
doc_EmberJs
2016-11-30 16:50:52
Comments
Leave a Comment

Please login to continue.