DS.Errors#isEmpty

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

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#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.Errors#errorsByAttributeName

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

DS.Errors#content

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

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#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

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

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

DS.Ember.HTMLBars.helpers

DS.Ember.HTMLBars.helpers Class Module: ember-data