Skip to content

Instantly share code, notes, and snippets.

@listochkin
Created September 4, 2013 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save listochkin/6434428 to your computer and use it in GitHub Desktop.
Save listochkin/6434428 to your computer and use it in GitHub Desktop.
Support for App.Person.find({name: 'Tom'})
App.Store = DS.Store.extend({
adapter: DS.FixtureAdapter.extend({
queryFixtures: function(fixtures, query, type) {
return fixtures.filter(function (fixture) {
for (var key in query) {
if (fixture[key] != query[key]) // type coercion required
return false;
}
return true;
});
}
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment