I have the following setup:
App.Router.map(function() {
this.route('tab', { 'path' : 'tab/:which' });
});
App.ApplicationStore = DS.Store.extend({});
App.ApplicationAdapter = DS.RESTAdapter.extend({
host: '../api'
});
App.TabAdapter = DS.RESTAdapter.extend({
find: function(store, type, id) {
alert("I doesn't get invoked");
return this._super(store, type, id);
}
});
App.TabRoute = Ember.Route.extend({
model: function(params) {
return this.store.find('emails', {tab: "inbox"});
}
});
And when visiting the route #/tab/inbox
i wanna rewrite the URL for the endpoint from
http://localhost/ba/api/emails?tab=inbox
into
http://localhost/ba/api/emails/inbox
. Therefore i'm overriding the find()
-method on the TabAdapter, but when this.store.find('emails', {tab: "inbox"});
runs, it doesn't enter my overridden method(and my test-alert doesn't get invoked).
Why does my overridden find()
-method not get invoked?