My application has the following models:
App.Store = DS.Store.extend({ revision: 11, adapter: \'DS.FixtureAdapter\' }); App.List = DS.Model.extend({
When using coffeescript, I like to use the one-line syntax, first getting the property values array with .mapBy('propertyName') and then using a simple coffeescript reduce:
.mapBy('propertyName')
reduce
@get('users').mapBy('tweetsUnread').reduce (a, b) -> a + b