Last active
August 29, 2015 14:14
-
-
Save knownasilya/94e3c6bc6a37c165f5c0 to your computer and use it in GitHub Desktop.
Sorting models without ArrayController
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
sortedModels: Ember.computed('model', function () { | |
var model = this.get('model'); | |
// filterBy, filter, sortBy, sort, or some manual work.. | |
return model.sortBy('isTasty', true); | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment