DS.BuildURLMixin#urlForUpdateRecord()

urlForUpdateRecord (id, modelName, snapshot) String Defined in addon/-private/adapters/build-url-mixin.js:323 Builds a URL for a record.save() call when the record has been update locally. Example: app/adapters/application.js import DS from 'ember-data'; export default DS.RESTAdapter.extend({ urlForUpdateRecord(id, modelName, snapshot) { return `/${id}/feed?access_token=${snapshot.adapterOptions.token}`; } }); Parameters: id String modelName String snapshot DS.Snapshot

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

DS.JSONSerializer#serializeHasMany()

serializeHasMany (snapshot, json, relationship) Defined in addon/serializers/json.js:1206 serializeHasMany can be used to customize how DS.hasMany properties are serialized. Example app/serializers/post.js import DS from 'ember-data'; export default DS.JSONSerializer.extend({ serializeHasMany: function(snapshot, json, relationship) { var key = relationship.key; if (key === 'comments') { return; } else { this._super.apply(this, arguments); } } }); Paramet

Ember.computed.uniqBy()

uniqBy (dependentKey, propertyKey) Ember.ComputedPropertypublic Defined in packages/ember-runtime/lib/computed/reduce_computed_macros.js:379 A computed property which returns a new array with all the unique elements from an array, with uniqueness determined by specific key. Example let Hamster = Ember.Object.extend({ uniqueFruits: Ember.computed.uniqBy('fruits', 'id') }); let hamster = Hamster.create({ fruits: [ { id: 1, 'banana' }, { id: 2, 'grape' }, { id: 3, 'peach' },

Router#transitionTo()

transitionTo (name, models, options) Transitionpublic Defined in packages/ember-routing/lib/system/router.js:346 Transition the application into another route. The route may be either a single route or route path: See Route.transitionTo for more info. Parameters: name String the name of the route or a URL models ...Object the model(s) or identifier(s) to be used while transitioning to the route. options [Object] optional hash with a queryParams property containing a mapping of

DS.InvalidError

DS.InvalidError Class Defined in: addon/adapters/errors.js:58 Module: ember-data A DS.InvalidError is used by an adapter to signal the external API was unable to process a request because the content was not semantically correct or meaningful per the API. Usually this means a record failed some form of server side validation. When a promise from an adapter is rejected with a DS.InvalidError the record will transition to the invalid state and the errors will be set to the errors property on

Ember.isEqual()

isEqual (a, b) Booleanpublic Defined in packages/ember-runtime/lib/is-equal.js:1 Compares two objects, returning true if they are equal. Ember.isEqual('hello', 'hello'); // true Ember.isEqual(1, 2); // false isEqual is a more specific comparison than a triple equal comparison. It will call the isEqual instance method on the objects being compared, allowing finer control over when objects should be considered equal to each other. let Person =

Ember.computed.intersect()

intersect (propertyKey) Ember.ComputedPropertypublic Defined in packages/ember-runtime/lib/computed/reduce_computed_macros.js:438 A computed property which returns a new array with all the duplicated elements from two or more dependent arrays. Example let obj = Ember.Object.extend({ friendsInCommon: Ember.computed.intersect('adaFriends', 'charlesFriends') }).create({ adaFriends: ['Charles Babbage', 'John Hobhouse', 'William King', 'Mary Somerville'], charlesFriends: ['William King', '

Troubleshooting

Troubleshooting Below are some common issues you may encounter when using the Inspector, along with the necessary steps to solve them. If your issue is not listed below, please submit an issue to the Inspector's GitHub repo. Ember Application Not Detected If the Inspector cannot detect an Ember application, you will see the following message: Some of the reasons this may happen: This is not an Ember application You are using an old Ember version ( < 1.0 ). You are using a protocol other t

String.htmlSafe()

htmlSafeHandlebars.SafeStringpublicstatic Defined in packages/ember-htmlbars/lib/utils/string.js:77 Mark a string as safe for unescaped output with Ember templates. If you return HTML from a helper, use this function to ensure Ember's rendering layer does not escape the HTML. Ember.String.htmlSafe('<div>someString</div>') Returns: Handlebars.SafeString A string that will not be HTML escaped by Handlebars.