Ember.typeOf()

typeOf (item) Stringpublic Defined in packages/ember-runtime/lib/utils.js:55 Returns a consistent type for the passed object. Use this instead of the built-in typeof to get the type of an item. It will return the same result across all browsers and includes a bit more detail. Here is what will be returned: | Return Value | Meaning | |---------------|------------------------------------------------------| | 'string' | String primitive or Str

Enumerable#firstObject

firstObjectObjectpublic Defined in packages/ember-runtime/lib/mixins/enumerable.js:140 Helper method returns the first object from a collection. This is usually used by bindings and other parts of the framework to extract a single object if the enumerable contains only one item. If you override this method, you should implement it so that it will always return the same value each time it is called. If your enumerable contains only one object, this method should always return that object. If

DS.Errors

DS.Errors Class Extends: Ember.Object Uses: Ember.Enumerable Uses: Ember.Evented Defined in: addon/-private/system/model/errors.js:15 Module: ember-data Holds validation errors for a given record, organized by attribute names. Every DS.Model has an errors property that is an instance of DS.Errors. This can be used to display validation error messages returned from the server when a record.save() rejects. For Example, if you had a User model that looked like this: app/models/user.js import

Mixin

Ember.Mixin Class PUBLIC Defined in: packages/ember-metal/lib/mixin.js:401 Module: ember-metal The Ember.Mixin class allows you to create mixins, whose properties can be added to other classes. For instance, App.Editable = Ember.Mixin.create({ edit: function() { console.log('starting to edit'); this.set('isEditing', true); }, isEditing: false }); // Mix mixins into classes by passing them as the first arguments to // .extend. App.CommentView = Ember.View.extend(App.Editable,

DS.RecordArrayManager#updateRecordArrays()

updateRecordArrays Defined in addon/-private/system/record-array-manager.js:93 This method is invoked whenever data is loaded into the store by the adapter or updated by the adapter, or when a record has changed. It updates all record arrays that a record belongs to. To avoid thrashing, it only runs at most once per run loop.

Observable#set()

set (keyName, value) Objectpublic Defined in packages/ember-runtime/lib/mixins/observable.js:168 Sets the provided key or path to the value. This method is generally very similar to calling object[key] = value or object.key = value, except that it provides support for computed properties, the setUnknownProperty() method and property observers. Computed Properties If you try to set a value on a key that has a computed property handler defined (see the get() method for an example), then set()

DS.EmbeddedRecordsMixin#normalize()

normalize (typeClass, hash, prop) Object Defined in addon/serializers/embedded-records-mixin.js:100 Normalize the record and recursively normalize/extract all the embedded records while pushing them into the store as they are encountered A payload with an attr configured for embedded records needs to be extracted: { "post": { "id": "1" "title": "Rails is omakase", "comments": [{ "id": "1", "body": "Rails is unagi" }, { "id": "2", "body": "Omakase O_

ClassNamesSupport#classNameBindings

classNameBindingsArraypublic Defined in packages/ember-views/lib/mixins/class_names_support.js:41 A list of properties of the view to apply as class names. If the property is a string value, the value of that string will be applied as a class name. // Applies the 'high' class to the view element Ember.View.extend({ classNameBindings: ['priority'], priority: 'high' }); If the value of the property is a Boolean, the name of that property is added as a dasherized class name. // Applies th

Array#arrayContentDidChange()

arrayContentDidChange (startIdx, removeAmt, addAmt) Ember.Arraypublic Defined in packages/ember-runtime/lib/mixins/array.js:536 If you are implementing an object that supports Ember.Array, call this method just after the array content changes to notify any observers and invalidate any related properties. Pass the starting index of the change as well as a delta of the amounts to change. Parameters: startIdx Number The starting index in the array that did change. removeAmt Number The

Router#isActive()

isActive (routeName) Booleanprivate Defined in packages/ember-routing/lib/system/router.js:399 Determines if the supplied route is currently active. Parameters: routeName Returns: Boolean