# Ember Data questions

**URL:** <https://discuss.emberjs.com/t/ember-data-questions/3129>\
**Category:** Ember Data\
**Created:** [October 26, 2013, 9:51am UTC](https://discuss.emberjs.com/t/ember-data-questions/3129 "2013-10-26T09:51:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sammy007](https://avatars.discourse-cdn.com/v4/letter/s/2acd7d/32.png) [@sammy007](https://discuss.emberjs.com/u/sammy007)\
**Post date:** [October 26, 2013, 9:51am UTC](https://discuss.emberjs.com/t/ember-data-questions/3129/1 "2013-10-26T09:51:31Z")

</div>

I have routes:

```ruby
namespace :admin
  resources :movies do
    collection do
      get :drafts
    end
  end

```

How should I query them? Assuming I need to retrieve all movies and then draft movies. It’s simple to get all movies using `this.get(‘store’).find(‘movie’)`, but how to get drafts? After traversing RESTAdapter source I think it’s impossible to specify a path suffix. Well, I can override `findAll`:

```javascript
App.Store = DS.Store.extend({
  revision: 11,
  adapter: DS.RESTAdapter.extend({
    namespace: 'admin',
    findAll: function(store, type) {
      return $.getJSON("/admin/movies/drafts");
    }
  })
});

```

But now it’s impossible to retrieve all movies from `/admin/movies` path.

Any idea how to write custom finders for models? Any plans to make ember-data to support custom paths out of the box?

---

<div class="post-metadata">

**Author:** ![sammy007](https://avatars.discourse-cdn.com/v4/letter/s/2acd7d/32.png) [@sammy007](https://discuss.emberjs.com/u/sammy007)\
**Post date:** [October 27, 2013, 2:48pm UTC](https://discuss.emberjs.com/t/ember-data-questions/3129/2 "2013-10-27T14:48:10Z")

</div>

Probably noone can understand what I want. I believe this post much better to understand [ember.js - Ember Data load models from different paths - Stack Overflow](http://stackoverflow.com/questions/19619348/ember-data-load-models-from-different-paths)

---

<div class="post-metadata">

**Author:** ![mehulkar](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/mehulkar/32/11259_2.png) [@mehulkar](https://discuss.emberjs.com/u/mehulkar)\
**Post date:** [October 31, 2013, 5:52pm UTC](https://discuss.emberjs.com/t/ember-data-questions/3129/3 "2013-10-31T17:52:29Z")

</div>

I have the same use case with something like a `/search` endpoint nested under resources. I generally just use `$.getJSON` for non REST endpoints, but I’m interested to see what the convention is here.

---

<div class="post-metadata">

**Author:** ![sammy007](https://avatars.discourse-cdn.com/v4/letter/s/2acd7d/32.png) [@sammy007](https://discuss.emberjs.com/u/sammy007)\
**Post date:** [October 31, 2013, 7:21pm UTC](https://discuss.emberjs.com/t/ember-data-questions/3129/4 "2013-10-31T19:21:29Z")

</div>

Look at my stackoverflow post. There is a “solution” below.
