I am just starting out with Ember and using the docs at http://emberjs.com/api/data/classes/DS.Adapter.html to create a custom adapter for accessing a SOAP web service. When I try to access the store that uses this adapter, however, I get this error:
TypeError: Cannot call method 'lookupFactory' of undefined
Here's my code:
App = Ember.Application.create();
App.RMSoapAdapter = DS.Adapter.extend({
find: function(store, type, id) {
switch(type) {
case 'group-mailbox':
return getGroupMailboxForStore(id, store);
break;
default:
throw 'Unknown object type: ' + String(type);
break;
}
}
});
App.store = DS.Store.create({
adapter: App.RMSoapAdapter.create(),
});
App.IndexRoute = Ember.Route.extend({
model: function() {
var store = App.store;
return store.find('group-mailbox');
}
});