I figured it out digging through the code:
return this.store.findQuery( 'reading', {
designDoc: 'reading',
viewName: 'by_time',
options: {
descending: true
}
} )
Question
I have an Ember application backed by CouchDB. Currently, my default route is:
App.ReadingsRoute = Ember.Route.extend( {
model: function() {
return this.store.find( 'reading' )
}
} )
This pull entries from the all
view. I would like to switch it to by_time
, but I'm uncertain how to specify this.
Solution
I figured it out digging through the code:
return this.store.findQuery( 'reading', {
designDoc: 'reading',
viewName: 'by_time',
options: {
descending: true
}
} )