MutableArray#includes()

includes (obj, startAt) Booleanpublic Inherited from Ember.Enumerable but overwritten in packages/ember-runtime/lib/mixins/array.js:593 Returns true if the passed object can be found in the array. This method is a Polyfill for ES 2016 Array.includes. If no startAt argument is given, the starting location to search is 0. If it's negative, searches from the index of this.length + startAt by asc. [1, 2, 3].includes(2); // true [1, 2, 3].includes(4); // false [1, 2, 3].includes(3, 2);

DS.Adapter#shouldReloadAll()

shouldReloadAll (store, snapshotRecordArray) Boolean Defined in addon/adapter.js:527 Available since 1.13.0 This method is used by the store to determine if the store should reload all records from the adapter when records are requested by store.findAll. If this method returns true, the store will re-fetch all records from the adapter. If this method returns false, the store will resolve immediately using the cached records. For example, if you are building an events ticketing system, in wh

DS.Model#deleteRecord()

deleteRecord Defined in addon/-private/system/model/model.js:500 Marks the record as deleted but does not save it. You must call save afterwards if you want to persist it. You might use this method if you want to allow the user to still rollbackAttributes() after a delete it was made. Example app/routes/model/delete.js import Ember from 'ember'; export default Ember.Route.extend({ actions: { softDelete: function() { this.controller.get('model').deleteRecord(); }, confirm

DS.JSONSerializer#shouldSerializeHasMany()

shouldSerializeHasMany (snapshot, key, relationshipType) Boolean Defined in addon/serializers/json.js:857 Check if the given hasMany relationship should be serialized Parameters: snapshot DS.Snapshot key String relationshipType String Returns: Boolean true if the hasMany relationship should be serialized

ActionHandler#send()

send (actionName, context) public Defined in packages/ember-runtime/lib/mixins/action_handler.js:145 Triggers a named action on the ActionHandler. Any parameters supplied after the actionName string will be passed as arguments to the action target function. If the ActionHandler has its target property set, actions may bubble to the target. Bubbling happens when an actionName can not be found in the ActionHandler's actions hash or if the action target function returns true. Example App.Welco

Component.positionalParams

positionalParamspublicstatic Defined in packages/ember-htmlbars/lib/component.js:299 Available since 1.13.0 Enables components to take a list of parameters as arguments. For example, a component that takes two parameters with the names name and age: let MyComponent = Ember.Component.extend; MyComponent.reopenClass({ positionalParams: ['name', 'age'] }); It can then be invoked like this: {{my-component "John" 38}} The parameters can be referred to just like named parameters: Name: {{attr

DS.Model#unloadRecord()

unloadRecordprivate Defined in addon/-private/system/model/model.js:582

Test#currentPath()

currentPathObjectpublic Defined in packages/ember-testing/lib/helpers.js:167 Available since 1.5.0 Returns the current path. Example: function validateURL() { equal(currentPath(), 'some.path.index', "correct path was transitioned into."); } click('#some-link-id').then(validateURL); Returns: Object The currently active path.

DS.Model#destroyRecord()

destroyRecord (options) Promise Defined in addon/-private/system/model/model.js:532 Same as deleteRecord, but saves the record immediately. Example app/routes/model/delete.js import Ember from 'ember'; export default Ember.Route.extend({ actions: { delete: function() { var controller = this.controller; controller.get('model').destroyRecord().then(function() { controller.transitionToRoute('model.index'); }); } } }); If you pass an object on the adapter

String#dasherize()

dasherize (str) Stringpublic Defined in packages/ember-runtime/lib/system/string.js:245 Replaces underscores, spaces, or camelCase with dashes. 'innerHTML'.dasherize(); // 'inner-html' 'action_name'.dasherize(); // 'action-name' 'css-class-name'.dasherize(); // 'css-class-name' 'my favorite items'.dasherize(); // 'my-favorite-items' 'privateDocs/ownerInvoice'.dasherize(); // 'private-docs/owner-invoice' Parameters: str String The string to dasherize. Returns: