emberjs/data — pull request #1826 by jwright (2014-03-21 15:59:59+00:00)
Title: Extract the filtering of fixtures to easily mimic server retrieval schemes

Sometimes you want to find a record on the server with keys other than the ids.

Here is an example:

```js
App.BlogRoute = Ember.Route.extend({
model: function(params) {
return this.store.find("blog", params.slug);
}
});
```

Your API on the server should know to expect a `slug` as the parameter and retrieve the `Blog` object with that slug.

If you want to mimic this in your `FIXTURES`, you have to override the entire `find` function. This PR extracts the filtering for the fixture ids so you can override a simpler, more concise function that the `find` function calls.

This is what you would need for your `FixtureAdapter`.

```js
BlogAdapter = DS.FixtureAdapter.extend({
filterFixturesByIds: function(fixtures, ids) {
return fixtures.filter(function(blog) {
return Ember.EnumerableUtils.indexOf(ids, blog.slug) !== -1;
});
}
});
```