Skip to content

Commit 90db853

Browse files
committed
Error callback for UserModal.save()
1 parent a89e976 commit 90db853

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

_posts/2011-01-29-what-is-a-model.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ We will use the `save` api call which is intelligent and will send a PUT request
237237
user.save({name: 'Davis'}, {
238238
success: function (model) {
239239
alert(user.toJSON());
240+
},
241+
error: function () {
242+
alert('Oops, could not save the user ' + user.toJSON());
240243
}
241244
});
242245

0 commit comments

Comments
 (0)