title: Returning a Promise from a Computed Property
body: <p>I realize there have been several questions similar to this, but none of those answers seems to be resolving my issue.  My objective is to take a list of <code>language</code>'s, and filter them so that my template can display a subset of the full list.  </p>
  
  <p>I started off by verifying that my computed property is working:</p>
  
  <p><strong>MyController.js</strong></p>
  
  <pre><code>// Works as expected
  languagesFiltered: function() {
     return this.get('languages');
  }.property('languages')
  </code></pre>
  
  <p>Then I added in a filter function, but here's where I ran into trouble:</p>
  
  <p><strong>MyController.js</strong></p>
  
  <pre><code>languagesFiltered: function() {
     // console.log shows that languages is actually a promise
     var languages = this.get('languages');
  
     // all of this returns a promise, but Handlebars can't handle the promise
     return languages.then( function( languagesArray ) {
        return languagesArray.filter( function( item, index, enumerable) { 
           return item.get('name') !== 'English';
        });
     })
  }.property('languages')
  </code></pre>
  
  <p>I'm attempting to use the <code>Ember.Array.filter</code> method (<a href="http://emberjs.com/api/classes/Ember.ArrayProxy.html#method_filter" rel="nofollow">http://emberjs.com/api/classes/Ember.ArrayProxy.html#method_filter</a>).  The filter seems to be working correctly, but now <code>languagesFiltered</code> returns a promise, and Handlebars can't handle that.</p>
  
  <p>I tried one last alternative:</p>
  
  <p><strong>MyController.js</strong></p>
  
  <pre><code>languagesFiltered: function() {
       var languages = this.get('languages');
  
       // "return languages;" works
       // But "return languages.filter" returns an empty array
       return languages.filter( function( item, index, enumerable ) {
           console.log(item);
           return true;
     });
  }.property('languages')
  </code></pre>
  
  <p>And <code>console.log(item)</code> never gets called.  So my questions are:</p>
  
  <ul>
  <li>What is the best way to implement the simple filter I'm after?</li>
  <li>This is a read-only computed property, but what are best practices for handling async values in computed properties?</li>
  </ul>
  
  <p>I'm using Ember 1.7.0-beta4, Ember Data 1.0.0-beta10, and ember-cli 0.44.  I'd upgrade to Ember 1.7.0, but there's a small bug that affects another part of our app, so we're waiting until 1.7.1.  Thanks for your input!</p>