Skip to content

Instantly share code, notes, and snippets.

@jakecraige
Created August 14, 2014 02:35
Show Gist options
  • Save jakecraige/172c6fd7565bb7c107ac to your computer and use it in GitHub Desktop.
Save jakecraige/172c6fd7565bb7c107ac to your computer and use it in GitHub Desktop.
sortedContent: function() {
var content = this.get('content');
if (this.get('softDelete')) {
content = content.filterBy('softDeleted', false)
if (this.get('vendorSelected')) {
content = content.filterBy('vendor', this.get('vendorSelected'));
}
}
return content.sortBy('nameTranslated');
}.property('@each.softDeleted', '@each.vendor', 'vendorSelected', 'softDelete')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment