DS.BuildURLMixin#urlForFindAll()

urlForFindAll (modelName, snapshot) String Defined in addon/-private/adapters/build-url-mixin.js:137 Builds a URL for a store.findAll(type) call. Example: app/adapters/comment.js import DS from 'ember-data'; export default DS.JSONAPIAdapter.extend({ urlForFindAll(id, modelName, snapshot) { return 'data/comments.json'; } }); Parameters: modelName String snapshot DS.SnapshotRecordArray Returns: String url

DS.BuildURLMixin#urlForDeleteRecord()

urlForDeleteRecord (id, modelName, snapshot) String Defined in addon/-private/adapters/build-url-mixin.js:348 Builds a URL for a record.save() call when the record has been deleted locally. Example: app/adapters/application.js import DS from 'ember-data'; export default DS.RESTAdapter.extend({ urlForDeleteRecord(id, modelName, snapshot) { return this._super(...arguments) + '/destroy'; } }); Parameters: id String modelName String snapshot DS.Snapshot Returns: String

DS.BuildURLMixin#urlForCreateRecord()

urlForCreateRecord (modelName, snapshot) String Defined in addon/-private/adapters/build-url-mixin.js:298 Builds a URL for a record.save() call when the record was created locally using store.createRecord(). Example: app/adapters/application.js import DS from 'ember-data'; export default DS.RESTAdapter.extend({ urlForCreateRecord(modelName, snapshot) { return this._super(...arguments) + '/new'; } }); Parameters: modelName String snapshot DS.Snapshot Returns: String ur

DS.BuildURLMixin#pathForType()

pathForType (modelName) String Defined in addon/-private/adapters/build-url-mixin.js:410 Determines the pathname for a given type. By default, it pluralizes the type's name (for example, 'post' becomes 'posts' and 'person' becomes 'people'). Pathname customization For example if you have an object LineItem with an endpoint of "/line_items/". app/adapters/application.js import DS from 'ember-data'; export default DS.RESTAdapter.extend({ pathForType: function(modelName) { var decameliz

DS.BuildURLMixin#buildURL()

buildURL (modelName, id, snapshot, requestType, query) String Defined in addon/-private/adapters/build-url-mixin.js:33 Builds a URL for a given type and optional ID. By default, it pluralizes the type's name (for example, 'post' becomes 'posts' and 'person' becomes 'people'). To override the pluralization see pathForType. If an ID is specified, it adds the ID to the path generated for the type, separated by a /. When called by RESTAdapter.findMany() the id and snapshot parameters will be ar

DS.BuildURLMixin

DS.BuildURLMixin Class Defined in: addon/-private/adapters/build-url-mixin.js:5 Module: ember-data WARNING: This interface is likely to change in order to accomodate https://github.com/emberjs/rfcs/pull/4 Using BuildURLMixin To use url building, include the mixin when extending an adapter, and call buildURL where needed. The default behaviour is designed for RESTAdapter. Example export default DS.Adapter.extend(BuildURLMixin, { findRecord: function(store, type, id, snapshot) {

DS.BooleanTransform

DS.BooleanTransform Class Extends: DS.Transform Defined in: addon/-private/transforms/boolean.js:7 Module: ember-data The DS.BooleanTransform class is used to serialize and deserialize boolean attributes on Ember Data record objects. This transform is used when boolean is passed as the type parameter to the DS.attr function. Usage app/models/user.js import DS from 'ember-data'; export default DS.Model.extend({ isAdmin: DS.attr('boolean'), name: DS.attr('string'), email: DS.attr('str

DS.AdapterPopulatedRecordArray#loadRecords()

loadRecords (records, payload) private Defined in addon/-private/system/record-arrays/adapter-populated-record-array.js:65 Parameters: records Array payload Object normalized payload

DS.AdapterPopulatedRecordArray

DS.AdapterPopulatedRecordArray Class Extends: DS.RecordArray Defined in: addon/-private/system/record-arrays/adapter-populated-record-array.js:12 Module: ember-data Represents an ordered list of records whose order and membership is determined by the adapter. For example, a query sent to the adapter may trigger a search on the server, whose results would be loaded into an instance of the AdapterPopulatedRecordArray. If you want to update the array and get the latest records from the adapt

DS.AdapterError

DS.AdapterError Class Defined in: addon/adapters/errors.js:11 Module: ember-data