I have two related models - Task and Requirement. Requirements can be one of 3 types (Part, Tool, Material). A Task can have several requirements including several of the same type.

```
Task A
    Requirement 1 (Part)
    Requirement 2 (Part)
    Requirement 3 (Tool)
    Requirement 4 (Material)
    Requirement 5 (Tool)

```

When viewing a single Task I want to group the list of requirements by type in a sort of summary view. 

```
Task A
    Parts Requirements (2)
    Tooling Requirements (2)
    Materials Requirements (1)

```

I have a computedProperty mostly functioning in my TaskController but I can't seem to get it to return back the array of requirement summaries that I'm building. All the fixture data is setup properly for both models (I can iterate each requirement and show it in the template with no issues).

Here are the models

Task model
----------

```
App.Task = DS.Model.extend({
    name: DS.attr()
    requirements: DS.hasMany('requirement', { async: true})
});

```

Requirement model
-----------------

```
App.Requirement = DS.Model.extend({
    task_id: DS.belongsTo('task'),
    type: DS.attr(),
    description: DS.attr(),
    quantity: DS.attr()
})

```

Here is the controller:

App.TaskController
------------------

```
App.TaskController = Em.ObjectController.extend({
    requirementSummary: function () {
        var self = this,
            results = [];

        self.get('requirements').then(function(requirements) {

            var arrRequirements = requirements.get('content');

            var parts = {
                name: 'Parts',
                description: '',
                count: 0,
                css_class: 'fa-cog'
            },

            tools = {
                name: 'Tools',
                description: '',
                count: 0,
                css_class: 'fa-wrench'
            },

            materials = {
                name: 'Materials',
                description: '',
                count: 0,
                css_class: 'fa-tint'
            };

            arrRequirements.forEach(function (requirement) {
                if (requirement._data.name == 'Part') {
                    parts.description += requirement._data.description + ' (' + requirement._data.quantity + ')<br>';
                    parts.count++;
                } else if (requirement._data.name == 'Material') {
                    materials.description += requirement._data.description + ' (' + requirement._data.quantity + ')<br>';
                    materials.count++;
                } else if (requirement._data.name == 'Tooling') {
                    tools.description += requirement._data.description + ' (' + requirement._data.quantity + ')<br>';
                    tools.count++;
                }
            });

            if (parts.description !== '') {
                parts.description = parts.description.replace(/(<br>\s*)+$/);
            } else {
                parts.description = "No Parts requirements found";
            }

            if (materials.description !== '') {
                materials.description = materials.description.replace(/(<br>\s*)+$/);
            } else {
                materials.description = "No Materials requirements found";
            }

            if (tools.description !== '') {
                tools.description = tools.description.replace(/(<br>\s*)+$/);
            } else {
                tools.description = "No Tooling requirements found";
            }

            results.pushObject(parts);
            results.pushObject(tools);
            results.pushObject(materials);
        });

        return results;

    }.property()
});

```

Currently it returns back the empty results array because it is waiting on the `self.get` promise to fulfill. If I return the result of `self.get('requirements').then(...)` then it returns the promise, not the results array and Ember isn't happy because it's not an array. What I want is for it to return back the populated results array.

The closest question I've found is [here](https://stackoverflow.com/questions/23206883/how-to-return-a-promise-composed-of-nested-models-in-emberjs-with-emberdata "here") but it either doesn't solve the issue or I'm missing something.