Skip to content

Commit

Permalink
Merge pull request #2605 from piotrpalek/pp_fix_errors_for_documentation
Browse files Browse the repository at this point in the history
Fix DS.Errors#errorsFor documentation
  • Loading branch information
bmac committed Dec 17, 2014
2 parents d63fad9 + f27cb1b commit 9e6d95e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/ember-data/lib/system/model/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ export default Ember.Object.extend(Ember.Enumerable, Ember.Evented, {
email: 'invalidEmail'
});
user.save().catch(function(){
user.get('errors').errorsFor('email'); // ["Doesn't look like a valid email."]
user.get('errors').errorsFor('email'); // returns:
// [{attribute: "email", message: "Doesn't look like a valid email."}]
});
```
Expand Down

0 comments on commit 9e6d95e

Please sign in to comment.