Want to setup a callback after a transaction has committed? You can use didCreate and didUpdate on the model. I’m assuming you have a user model so something like:
1 2 3 4 5 6 7 8 9 10 | MyApp.User = DS.Model.extend({ first: DS.attr('string'), page: DS.attr('string'), didUpdate: function() { //Do something }, didCreate: function() { //do something } }); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.