Skip to content

Instantly share code, notes, and snippets.

@robneville73
Last active October 21, 2016 18:17
Show Gist options
  • Save robneville73/4a5ab3d1969f2714ab2bef150958d522 to your computer and use it in GitHub Desktop.
Save robneville73/4a5ab3d1969f2714ab2bef150958d522 to your computer and use it in GitHub Desktop.
reports: computed(function() {
return get(this, 'getReports').perform();
}),
firstReport: computed('reports.value.length', function() {
return get(this, 'reports.value.firstObject');
}),
someOtherThing: computed('reports.value.length', function() {
get(this, 'reports.value').forEach((report) => {
doCoolStuff(report);
});
}),
...
...
...
getReports: task(function*() {
let reports = yield get(this, 'store').query('report-menu', {
q: 'classname-EQOrder' + get(this, 'constant').DELIM,
orderby: 'sequence'
});
return reports;
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment