For most sorting scenarios, it is recommented to use Ember.SortableMixin , which is baked in Ember.ArrayController .
Please refer to this conceptual example in JSFiddle: http://jsfiddle.net/schawaska/tbbAe/
In this example, the model has a DateTime field called when , which I use to filter:
App.Greeting = DS.Model.extend({ text: DS.attr('string'), when: DS.attr('date') }); App.Greeting.FIXTURES = [ {id: 1, text: 'First', when: '3/4/2013 2:44:52 PM'}, {id: 2, text: 'Second', when: '3/4/2013 2:44:52 PM'}, {id: 3, text: 'Third', when: '3/4/2013 2:44:52 PM'}, {id: 4, text: 'Fourth', when: '3/4/2013 3:44:52 PM'} ];
In the controller, the only thing I need to do is set the property name and sort direction:
App.SortingMixinController = Em.ArrayController.extend({ sortProperties: ['when'], sortAscending: false });
Then, in my Handlebars template, I can use the {{each}} helper, as usual.
Since in this example all dates coincide except for Forth (which due to sorting appear first), and also due to SortableMixin , these values will be sorted through another property - I accept Id here.
Another approach I used in this fiddle is to use a computed property. I'm not quite sure about this approach, as it seems to consume more resources, and the code in App.SortingPropertyController deserves a laugh, but it seems to work to show the possibilities.