I have a simple ember data model:
WZ.Exercise = DS.Model.extend
name: DS.attr 'string'
description: DS.attr 'string'
group: DS.belongsTo 'WZ.Group'
I want to show the user a confirmation if a new record is saved or an error has occurred. The error may be that the object is invalid and a json error is returned, as shown below:
{"errors":{"description":["can't be blank"]}}
I see that each model has the isSaving property, isValid and the isError property.
Can someone tell me how I can use these properties to display the correct notifications to users?
source
share