-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ember Route - Adapter with no content #146
Comments
My environment:
|
@ericktm use findAll instead of find. this.store.findAll('categoria'); As for no records being returned, can you paste the output from your API? e.g., if your api is at localhost:8000/api/ run:
|
@ericktm You should also use the latest point release for Ember (1.13.10) and Ember Data (1.13.14). These versions have a lot of useful bug fixes. |
@dustinfarris Hello, thank you for answer. A changed to: // routes/categoria.js
import Ember from 'ember';
import AuthenticatedRouteMixin from 'simple-auth/mixins/authenticated-route-mixin';
export
default Ember.Route.extend(AuthenticatedRouteMixin, {
model: function() {
return this.store.findAll('categoria');
}
}); This is my response from server: {
"count": 14,
"next": "http://hostapi.com/api/categoria?page=2",
"previous": null,
"results": [{
"id": 490,
"nome": "sssss",
"descricao": "",
"inclusao": "2015-10-21T23:46:58.064503Z"
}, {
"id": 491,
"nome": "ssssssss",
"descricao": "",
"inclusao": "2015-10-21T23:47:01.165067Z"
}, {
"id": 480,
"nome": "cadastro novo",
"descricao": "Edição de registro",
"inclusao": "2015-10-20T00:01:46.658718Z"
}, {
"id": 486,
"nome": "teste",
"descricao": "",
"inclusao": "2015-10-21T23:46:49.616188Z"
}, {
"id": 492,
"nome": "sssssss",
"descricao": "",
"inclusao": "2015-10-21T23:47:03.857929Z"
}, {
"id": 473,
"nome": "Brazil",
"descricao": "ergrg",
"inclusao": "2015-07-02T17:08:21.810887Z"
}, {
"id": 481,
"nome": "Food",
"descricao": "Gastos gerais relacionados à alimentação",
"inclusao": "2015-10-20T00:02:02.573066Z"
}, {
"id": 487,
"nome": "ssss",
"descricao": "",
"inclusao": "2015-10-21T23:46:51.563832Z"
}, {
"id": 475,
"nome": "Salário",
"descricao": "",
"inclusao": "2015-07-06T20:51:13.740509Z"
}, {
"id": 482,
"nome": "Expenses",
"descricao": "description",
"inclusao": "2015-10-20T02:45:27.682914Z"
}]
} @benkonrath Thanks. I also upgrade packages to lastest versions. Ember 1.13.10 is not found. The last release from ember-cli repo is 1.13.8.
|
I noticed that your API endpoint does not have "s" on the end. Is Ember Data pluralizing this and adding an S which is why there are no results? Can you check the 'network' tab in chrome and find the request that is being made and see if it is correct. |
Checking with Chrome Inspector, the server is called GET method. The response is the same as returned when I use curl or SoapUI. |
Do you have some example project using django-ember-adapter? Maybe this can help |
There's not an example project that I am aware of. Can you create small project that demonstrates the issue that you are having? This will be the easiest way to for us help to investigate the problem. Thanks. |
I 'll create a new project from zero in this weekend and publish into github for avaliation purposes. |
Hello
I am with a 'little' problem to use ember-django-adapter.
I follow the instructions on docs, but when I call this.store.find('name') on my route, nothing is returned to template.
When I call this.store.query('name',{param1:123,param2:'abc'}), the meta attributes(pagination, count, etc) are populated, but content is not.
I don't know if it's a bug, or just my mistake. This is my configuration:
Anyone can help me?
The text was updated successfully, but these errors were encountered: