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.

有帮助吗?

解决方案

I figured it out digging through the code:

return this.store.findQuery( 'reading', {
  designDoc: 'reading',
  viewName: 'by_time',
  options: {
    descending: true
  }
} )
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top