DS.Adapter#updateRecord()

updateRecord (store, type, snapshot) Promise Defined in addon/adapter.js:322 Implement this method in a subclass to handle the updating of a record. Serializes the record update and sends it to the server. The updateRecord method is expected to return a promise that will resolve with the serialized record. This allows the backend to inform the Ember Data store the current state of this record after the update. If it is not possible to return a serialized record the updateRecord promise can

DS.RESTAdapter#findRecord()

findRecord (store, type, id, snapshot) Promise Inherited from DS.Adapter but overwritten in addon/adapters/rest.js:406 Available since 1.13.0 Called by the store in order to fetch the JSON for a given type and ID. The findRecord method makes an Ajax request to a URL computed by buildURL, and returns a promise for the resulting payload. This method performs an HTTP GET request with the id provided as part of the query string. Parameters: store DS.Store type DS.Model id String sna

Enumerable#reduce()

reduce (callback, initialValue, reducerProperty) Objectpublic Defined in packages/ember-runtime/lib/mixins/enumerable.js:685 This will combine the values of the enumerator into a single value. It is a useful way to collect a summary value from an enumeration. This corresponds to the reduce() method defined in JavaScript 1.8. The callback method you provide should have the following signature (all parameters are optional): function(previousValue, item, index, enumerable); previousValue is

Enumerable#addEnumerableObserver()

addEnumerableObserver (target, opts) private Defined in packages/ember-runtime/lib/mixins/enumerable.js:869 Registers an enumerable observer. Must implement Ember.EnumerableObserver mixin. Parameters: target Object opts [Object] Returns: this

TargetActionSupport#triggerAction()

triggerAction (opts) Booleanprivate Defined in packages/ember-runtime/lib/mixins/target_action_support.js:44 Send an action with an actionContext to a target. The action, actionContext and target will be retrieved from properties of the object. For example: App.SaveButtonView = Ember.View.extend(Ember.TargetActionSupport, { target: Ember.computed.alias('controller'), action: 'save', actionContext: Ember.computed.alias('context'), click() { this.triggerAction(); // Sends the `sav

ViewTargetActionSupport#nearestWithProperty()

nearestWithProperty (property) deprecatedprivate Defined in packages/ember-views/lib/mixins/view_support.js:44 use yield and contextual components for composition instead. Return the nearest ancestor that has a given property. Parameters: property String A property name Returns: Ember.View

DS.JSONSerializer#serializePolymorphicType()

serializePolymorphicType (snapshot, json, relationship) Defined in addon/serializers/json.js:1255 You can use this method to customize how polymorphic objects are serialized. Objects are considered to be polymorphic if { polymorphic: true } is pass as the second argument to the DS.belongsTo function. Example app/serializers/comment.js import DS from 'ember-data'; export default DS.JSONSerializer.extend({ serializePolymorphicType: function(snapshot, json, relationship) { var key = re

MutableEnumerable#addObject()

addObject (object) Objectpublic Defined in packages/ember-runtime/lib/mixins/mutable_enumerable.js:52 Required. You must implement this method to apply this mixin. Attempts to add the passed object to the receiver if the object is not already present in the collection. If the object is present, this method has no effect. If the passed object is of a type not supported by the receiver, then this method should raise an exception. Parameters: object Object The object to add to the enumera

DS.RESTAdapter#methodForRequest()

methodForRequest (params) Stringpublic Defined in addon/adapters/rest.js:1254 Get the HTTP method for a request. Parameters: params Object Returns: String HTTP method

ViewTargetActionSupport

Ember.ViewTargetActionSupport Class PRIVATE Extends: Ember.TargetActionSupport Defined in: packages/ember-views/lib/mixins/view_target_action_support.js:5 Module: ember Ember.ViewTargetActionSupport is a mixin that can be included in a view class to add a triggerAction method with semantics similar to the Handlebars {{action}} helper. It provides intelligent defaults for the action's target: the view's controller; and the context that is sent with the action: the view's context. Note: In n