DS.BuildURLMixin#urlForUpdateRecord()

urlForUpdateRecord (id, modelName, snapshot) String

Defined in addon/-private/adapters/build-url-mixin.js:323

Builds a URL for a record.save() call when the record has been update locally.

Example:

app/adapters/application.js
import DS from 'ember-data';

export default DS.RESTAdapter.extend({
  urlForUpdateRecord(id, modelName, snapshot) {
    return `/${id}/feed?access_token=${snapshot.adapterOptions.token}`;
  }
});

Parameters:

id String
modelName String
snapshot DS.Snapshot

Returns:

String
url
doc_EmberJs
2016-11-30 16:49:32
Comments
Leave a Comment

Please login to continue.