DS.RESTSerializer#pushPayload()

pushPayload (store, payload)

Defined in addon/serializers/rest.js:380

This method allows you to push a payload containing top-level collections of records organized per type.

{
  "posts": [{
    "id": "1",
    "title": "Rails is omakase",
    "author", "1",
    "comments": [ "1" ]
  }],
  "comments": [{
    "id": "1",
    "body": "FIRST"
  }],
  "users": [{
    "id": "1",
    "name": "@d2h"
  }]
}

It will first normalize the payload, so you can use this to push in data streaming in from your server structured the same way that fetches and saves are structured.

Parameters:

store DS.Store
payload Object
doc_EmberJs
2016-11-30 16:50:37
Comments
Leave a Comment

Please login to continue.