Convert Composer to use Store

- Uses store for `PostStream`, `TopicList` too
This commit is contained in:
Robin Ward
2015-04-08 14:44:44 -04:00
parent a83a19f6ce
commit d4a05825da
23 changed files with 507 additions and 393 deletions

View File

@ -1,8 +1,10 @@
import Store from "discourse/models/store";
import RestAdapter from 'discourse/adapters/rest';
import Resolver from 'discourse/ember/resolver';
let _restAdapter;
export default function() {
const resolver = Resolver.create();
return Store.create({
container: {
lookup(type) {
@ -12,7 +14,10 @@ export default function() {
}
},
lookupFactory: function() { }
lookupFactory(type) {
const split = type.split(':');
return resolver.customResolve({type: split[0], fullNameWithoutType: split[1]});
},
}
});
}