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

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -