ember.js - Add Ember Data query helper method -


i'm using ember api json api backend. api accepts filters this:

/users?filter[simple][name]=john 

right now, whenever want make query, i'm doing this:

this.store.query('users', {   filter: {     simple: {       name: 'john'     }   } }); 

it nice avoid verbosity adding helper function works this:

this.store.simplequery('users', { name: 'john' }); 

that function pass arguments directly query(), wrapping query in { filter: { simple: ... } }.

is possible? how do this?

well stopping creating own method in adapter that?

// ... adapter code   simplequery: function(modelname, query) {     return this.store.query('users', {         filter: {             simple: {                 name: 'john'             }         }     }); }  // ... 

Comments

Popular posts from this blog

swift - Button on Table View Cell connected to local function -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

c# - ajax - How to receive data both html and json from server? -