Skip to content

Instantly share code, notes, and snippets.



Last active Aug 29, 2015
What would you like to do?
App.CompanyItemController = Ember.ObjectController.extend({
openDeals: Ember.computed.filter('deals.@each.{status,value}', function(item){
return item.get('state') !== 'lost';
opendDealsValues: Ember.computed.mapBy('openDeals', 'value'),
total: Ember.computed.sum("opendDealsValues"),
dealTotals: App.computed.groupable('deals',function(deal){
return deal.get('state');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.