DS#changes
DS#changes(resourceName, id[, options])
Synchronously return the changes object of the item of the type specified by resourceName
that has the primary key specified by id
. This object represents the diff between the item in its current state and the state of the item the last time it was saved via an adapter.
You can call
DS#changes
multiple ways
DS#changes(resourceName, id[, options])
Resource#changes(id[, options])
- Where Resource was created byDS#defineResource
Instance#DSChanges([options])
- Where Instance is an instance of a Resource
Argument | Type | Description |
---|---|---|
resourceName | string | The name of the resource to use. Unnecessary if calling changes directly on a Resource. |
id | string or number | The primary key of the item whose changes are to be retrieved. |
options | object | Optional configuration. Default: { } |
options.ignoredChanges | array | Array of strings or regular expressions of fields, the changes of which are to be ignored. Defaults: [ ] . |
Demo
Need help?
Want more examples or have a question? Ask on the Slack channel or post on the mailing list then we'll get your question answered and probably update this wiki.
Updated less than a minute ago