DS.Errors#has()

has (attribute) Boolean Defined in addon/-private/system/model/errors.js:405 Checks if there is error messages for the given attribute. app/routes/user/edit.js import Ember from 'ember'; export default Ember.Route.extend({ actions: { save: function(user) { if (user.get('errors').has('email')) { return alert('Please update your email before attempting to save.'); } user.save(); } } }); Parameters: attribute String Returns: Boolean true i

DS.Errors#isEmpty

isEmpty{Boolean} Defined in addon/-private/system/model/errors.js:202

DS.Errors#add()

add (attribute, messages) deprecated Defined in addon/-private/system/model/errors.js:209 Adds error messages to a given attribute and sends becameInvalid event to the record. Example: if (!user.get('username') { user.get('errors').add('username', 'This field is required'); } Parameters: attribute String messages (Array|String)

DS.Errors#clear()

cleardeprecated Defined in addon/-private/system/model/errors.js:345 Removes all error messages and sends becameValid event to the record. Example: app/routes/user/edit.js import Ember from 'ember'; export default Ember.Route.extend({ actions: { retrySave: function(user) { user.get('errors').clear(); user.save(); } } });

DS.Errors#content

content{Array}private Defined in addon/-private/system/model/errors.js:175

DS.Errors#errorsByAttributeName

errorsByAttributeName{Ember.MapWithDefault}private Defined in addon/-private/system/model/errors.js:123

DS.Errors#errorsFor()

errorsFor (attribute) Array Defined in addon/-private/system/model/errors.js:136 Returns errors for a given attribute var user = store.createRecord('user', { username: 'tomster', email: 'invalidEmail' }); user.save().catch(function(){ user.get('errors').errorsFor('email'); // returns: // [{attribute: "email", message: "Doesn't look like a valid email."}] }); Parameters: attribute String Returns: Array

DS.EmbeddedRecordsMixin#_extractEmbeddedRecords()

_extractEmbeddedRecordsprivate Defined in addon/serializers/embedded-records-mixin.js:530

DS.EmbeddedRecordsMixin#_normalizeEmbeddedRelationship()

_normalizeEmbeddedRelationshipprivate Defined in addon/serializers/embedded-records-mixin.js:600

DS.Ember.HTMLBars.helpers.pluralize()

pluralize (count, word) Defined in node_modules/ember-inflector/addon/lib/helpers/pluralize.js:4 If you have Ember Inflector (such as if Ember Data is present), pluralize a word. For example, turn "ox" into "oxen". Example: {{pluralize count myProperty}} {{pluralize 1 "oxen"}} {{pluralize myProperty}} {{pluralize "ox"}} Parameters: count [Number|Property] count of objects word String|Property word to pluralize