Pergunta

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.

Foi útil?

Solução

I figured it out digging through the code:

return this.store.findQuery( 'reading', {
  designDoc: 'reading',
  viewName: 'by_time',
  options: {
    descending: true
  }
} )
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top