Skip to content

Instantly share code, notes, and snippets.

@cmwelsh
Created June 17, 2013 22:36
Show Gist options
  • Save cmwelsh/5801122 to your computer and use it in GitHub Desktop.
Save cmwelsh/5801122 to your computer and use it in GitHub Desktop.
var guarantorFetchedPromise = $.Deferred();
var collateralFetchedPromise = $.Deferred();
this.guarantorCollection.fetch({
success: guarantorFetchedPromise.resolve,
error: guarantorFetchedPromise.reject
})
this.collateralCollection.fetch({
success: collateralFetchedPromise.resolve,
error: collateralFetchedPromise.reject
})
$.when(guarantorFetchedPromise, collateralFetchedPromise)
.then(_.bind(this.renderSubviews, this), _.bind(this.error, this))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment