Customizing Serializers

Customizing Serializers In Ember Data, serializers format the data sent to and received from the backend store. By default, Ember Data serializes data using the JSON API format. If your backend uses a different format, Ember Data allows you to customize the serializer or use a different serializer entirely. Ember Data ships with 3 Serializers. The JSONAPISerializer is the default serializer and works with JSON API backends. The JSONSerializer is a simple serializer for working with single jso

Test#resolve()

resolve (The) public Defined in packages/ember-testing/lib/test/promise.js:39 Available since 1.2.0 Replacement for Ember.RSVP.resolve The only difference is this uses an instance of Ember.Test.Promise Parameters: The Mixed value to resolve

LinkComponent#href

hrefprivate Defined in packages/ember-htmlbars/lib/components/link-to.js:695 Sets the element's href attribute to the url for the LinkComponent's targeted route. If the LinkComponent's tagName is changed to a value other than a, this property will be ignored.

DS.JSONAPISerializer#serializeAttribute()

serializeAttribute (snapshot, json, key, attribute) Inherited from DS.JSONSerializer but overwritten in addon/serializers/json-api.js:487 Parameters: snapshot DS.Snapshot json Object key String attribute Object

AriaRoleSupport#sendAction()

sendAction (action, params) public Defined in packages/ember-views/lib/mixins/action_support.js:23 Calls an action passed to a component. For example a component for playing or pausing music may translate click events into action notifications of "play" or "stop" depending on some internal state of the component: // app/components/play-button.js export default Ember.Component.extend({ click() { if (this.get('isPlaying')) { this.sendAction('play'); } else { this.sendAct

Test#injectTestHelpers()

injectTestHelperspublic Defined in packages/ember-testing/lib/ext/application.js:96 This injects the test helpers into the helperContainer object. If an object is provided it will be used as the helperContainer. If helperContainer is not set it will default to window. If a function of the same name has already been defined it will be cached (so that it can be reset if the helper is removed with unregisterHelper or removeTestHelpers). Any callbacks registered with onInjectHelpers will be cal

EventDispatcher

Ember.EventDispatcher Class PRIVATE Extends: Ember.Object Defined in: packages/ember-views/lib/system/event_dispatcher.js:22 Module: ember-views Ember.EventDispatcher handles delegating browser events to their corresponding Ember.Views. For example, when you click on a view, Ember.EventDispatcher ensures that that view's mouseDown method gets called.

DS.NumberTransform

DS.NumberTransform Class Extends: DS.Transform Defined in: addon/-private/transforms/number.js:10 Module: ember-data The DS.NumberTransform class is used to serialize and deserialize numeric attributes on Ember Data record objects. This transform is used when number is passed as the type parameter to the DS.attr function. Usage app/models/score.js import DS from 'ember-data'; export default DS.Model.extend({ value: DS.attr('number'), player: DS.belongsTo('player'), date: DS.attr('da

Observable#addObserver()

addObserver (key, target, method) public Defined in packages/ember-runtime/lib/mixins/observable.js:333 Adds an observer on a property. This is the core method used to register an observer for a property. Once you call this method, any time the key's value is set, your observer will be notified. Note that the observers are triggered any time the value is set, regardless of whether it has actually changed. Your observer should be prepared to handle that. You can also pass an optional context

DS.Adapter#createRecord()

createRecord (store, type, snapshot) Promise Defined in addon/adapter.js:282 Implement this method in a subclass to handle the creation of new records. Serializes the record and sends it to the server. Example app/adapters/application.js import DS from 'ember-data'; export default DS.Adapter.extend({ createRecord: function(store, type, snapshot) { var data = this.serialize(snapshot, { includeId: true }); return new Ember.RSVP.Promise(function(resolve, reject) { Ember.$.aja