Skip to content

Instantly share code, notes, and snippets.

@abuiles
Created October 28, 2014 12:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abuiles/27dab360c9bb9d57cffa to your computer and use it in GitHub Desktop.
Save abuiles/27dab360c9bb9d57cffa to your computer and use it in GitHub Desktop.
model: function() {
var articles = this.modelFor('friends/show').get('articles');
if (articles.get('isFulfilled')) {
articles.reload();
}
return articles.then(function(collection) {
var result;
if (!params.showReturned) {
result = collection.filterBy('state', 'borrowed');
}
return result;
});
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment