Skip to content

Instantly share code, notes, and snippets.

@stevehanson
Created August 7, 2015 19:55
Show Gist options
  • Save stevehanson/eb9d6b11e6135d656f24 to your computer and use it in GitHub Desktop.
Save stevehanson/eb9d6b11e6135d656f24 to your computer and use it in GitHub Desktop.
RSVP.all Promises Example
let promises = [];
comments.forEach((comment) => {
promises.push(comment.save());
});
Ember.RSVP.all(promises).then((comments) => {
post.get('comments').addObjects(comments);
post.save();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment