Route#controller

controllerEmber.Controllerpublic Defined in packages/ember-routing/lib/system/route.js:729 Available since 1.6.0 The controller associated with this route. Example App.FormRoute = Ember.Route.extend({ actions: { willTransition: function(transition) { if (this.controller.get('userHasEnteredData') && !confirm('Are you sure you want to abandon progress?')) { transition.abort(); } else { // Bubble the `willTransition` action so that //

DS.BuildURLMixin#urlForFindHasMany()

urlForFindHasMany (id, modelName, snapshot) String Defined in addon/-private/adapters/build-url-mixin.js:244 Builds a URL for fetching a async hasMany relationship when a url is not provided by the server. Example: app/adapters/application.js import DS from 'ember-data'; export default DS.JSONAPIAdapter.extend({ urlForFindHasMany(id, modelName, snapshot) { let baseUrl = this.buildURL(id, modelName); return `${baseUrl}/relationships`; } }); Parameters: id String modelName

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

DS.JSONAPISerializer#keyForRelationship()

keyForRelationship (key, typeClass, method) String Inherited from DS.JSONSerializer but overwritten in addon/serializers/json-api.js:427 keyForRelationship can be used to define a custom key when serializing and deserializing relationship properties. By default JSONAPISerializer follows the format used on the examples of http://jsonapi.org/format and uses dashes as word separators in relationship properties. This behaviour can be easily customized by extending this method. Example app/seria

DS.JSONSerializer#normalizeUpdateRecordResponse()

normalizeUpdateRecordResponse (store, primaryModelClass, payload, id, requestType) Object Defined in addon/serializers/json.js:388 Available since 1.13.0 Parameters: store DS.Store primaryModelClass DS.Model payload Object id String|Number requestType String Returns: Object JSON-API Document

DS.JSONSerializer#normalizeFindRecordResponse()

normalizeFindRecordResponse (store, primaryModelClass, payload, id, requestType) Object Defined in addon/serializers/json.js:262 Available since 1.13.0 Parameters: store DS.Store primaryModelClass DS.Model payload Object id String|Number requestType String Returns: Object JSON-API Document

DS.RESTAdapter#queryRecord()

queryRecord (store, type, query) Promise Inherited from DS.Adapter but overwritten in addon/adapters/rest.js:511 Available since 1.13.0 Called by the store in order to fetch a JSON object for the record that matches a particular query. The queryRecord method makes an Ajax (HTTP GET) request to a URL computed by buildURL, and returns a promise for the resulting payload. The query argument is a simple JavaScript object that will be passed directly to the server as parameters. Parameters: s

DS.Store#recordForId()

recordForId (modelName, id) DS.Modelprivate Defined in addon/-private/system/store.js:983 Returns id record for a given type and ID. If one isn't already loaded, it builds a new record and leaves it in the empty state. Parameters: modelName String id (String|Integer) Returns: DS.Model record

DS.JSONSerializer#normalizeFindManyResponse()

normalizeFindManyResponse (store, primaryModelClass, payload, id, requestType) Object Defined in addon/serializers/json.js:332 Available since 1.13.0 Parameters: store DS.Store primaryModelClass DS.Model payload Object id String|Number requestType String Returns: Object JSON-API Document

Route#deserializeQueryParam()

deserializeQueryParam (value, urlKey, defaultValueType) private Defined in packages/ember-routing/lib/system/route.js:409 Deserializes value of the query parameter based on defaultValueType Parameters: value Object urlKey String defaultValueType String