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 -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -