DataAdapter#acceptsModelName

acceptsModelNamepublic Defined in packages/ember-extension-support/lib/data_adapter.js:91 Ember Data > v1.0.0-beta.18 requires string model names to be passed around instead of the actual factories. This is a stamp for the Ember Inspector to differentiate between the versions to be able to support older versions too.

Instrumentation

Ember.Instrumentation Namespace PRIVATE Defined in: packages/ember-metal/lib/instrumentation.js:4 Module: ember The purpose of the Ember Instrumentation module is to provide efficient, general-purpose instrumentation for Ember. Subscribe to a listener by using Ember.subscribe: Ember.subscribe("render", { before(name, timestamp, payload) { }, after(name, timestamp, payload) { } }); If you return a value from the before callback, that same value will be passed as a fourth paramet

Ember.deprecate()

deprecate (message, test, options) public Defined in packages/ember-debug/lib/deprecate.js:97 Display a deprecation warning with the provided message and a stack trace (Chrome and Firefox only). In a production build, this method is defined as an empty function (NOP). Uses of this method in Ember itself are stripped from the ember.prod.js build. Parameters: message String A description of the deprecation. test Boolean A boolean. If falsy, the deprecation will be displayed. option

Specifying the URL Type

Specifying the URL Type The Ember router has four options to manage your application's URL: history, which uses the HTML5 History API; hash, which uses anchor-based URLs; auto, which uses history if supported by the user's browser, and falls back to hash otherwise; and none, which doesn't update the URL. By default, Ember CLI configures the router to use auto. You can change this option in config/environment.js under ENV.locationType. history When using history, Ember uses the browser's histo

Inflector

Ember.Inflector Class Defined in: node_modules/ember-inflector/addon/lib/system/inflector.js:32 Module: ember-data Inflector.Ember provides a mechanism for supplying inflection rules for your application. Ember includes a default set of inflection rules, and provides an API for providing additional rules. Examples: Creating an inflector with no rules. var inflector = new Ember.Inflector(); Creating an inflector with the default ember ruleset. var inflector = new Ember.Inflector(Ember.Infl

Ember.computed.setDiff()

setDiff (setAProperty, setBProperty) Ember.ComputedPropertypublic Defined in packages/ember-runtime/lib/computed/reduce_computed_macros.js:493 A computed property which returns a new array with all the properties from the first dependent array that are not in the second dependent array. Example let Hamster = Ember.Object.extend({ likes: ['banana', 'grape', 'kale'], wants: Ember.computed.setDiff('likes', 'fruits') }); let hamster = Hamster.create({ fruits: [ 'grape', 'kale',

DataAdapter#watchModelTypes()

watchModelTypes (typesAdded, typesUpdated) Functionpublic Defined in packages/ember-extension-support/lib/data_adapter.js:129 Fetch the model types and observe them for changes. Parameters: typesAdded Function Callback to call to add types. Takes an array of objects containing wrapped types (returned from `wrapModelType`). typesUpdated Function Callback to call when a type has changed. Takes an array of objects containing wrapped types. Returns: Function Method to call to rem

DS.Model#rollbackAttributes()

rollbackAttributes Defined in addon/-private/system/model/model.js:671 Available since 1.13.0 If the model hasDirtyAttributes this function will discard any unsaved changes. If the model isNew it will be removed from the store. Example record.get('name'); // 'Untitled Document' record.set('name', 'Doc 1'); record.get('name'); // 'Doc 1' record.rollbackAttributes(); record.get('name'); // 'Untitled Document'

DataAdapter#wrapModelType()

wrapModelType (klass, modelName) Objectprivate Defined in packages/ember-extension-support/lib/data_adapter.js:311 Wraps a given model type and observes changes to it. Parameters: klass Class A model class. modelName String Name of the class. Returns: Object Contains the wrapped type and the function to remove observers Format: type: {Object} The wrapped type. The wrapped type has the following format: name: {String} The name of the type. count: {Integer} The number of record

ArrayProxy#contentArrayDidChange()

contentArrayDidChange (contentArray, start, removeCount, addCount) private Defined in packages/ember-runtime/lib/system/array_proxy.js:167 Override to implement content array didChange observer. Parameters: contentArray Ember.Array the content array start Number starting index of the change removeCount Number count of items removed addCount Number count of items added