Reputation: 161
I want to retrieve information through a REST request and set up a RESTAdapter like this:
App.ApplicationAdapter = DS.RESTAdapter.extend({
url: 'http://whatever.local'
});
Ember is doing a GET request but is not appending a parameter if I try do to a this.store.find('entry', 11)
or this.store.findQuery('entry', {foo:'bar'})
Additionally it does not send the request to the url I defined. It just sends it to the host the app is running on.
Therefore I'm guessing I initialize the Adapter not properly, but cant seem to find the answer what I am doing wrong.
App.OverviewRoute = Ember.Route.extend({
model: function (params) {
console.log(params);
var entries = this.store.findQuery('entry', {periodDate: params.period_id});
return entries;
}
});
Help is appreciated.
Upvotes: 1
Views: 731
Reputation: 21460
Starting in EmberData 1.0.beta.1, the adapter option is host
, not url
(see here in the transition guide):
App.ApplicationAdapter = DS.RESTAdapter.extend({
host: 'http://whatever.local'
});
Upvotes: 2