discourse/test/javascripts/helpers/create-store.js.es6
2015-03-06 12:37:24 -05:00

19 lines
429 B
JavaScript

import Store from "discourse/models/store";
import RestAdapter from 'discourse/adapters/rest';
let _restAdapter;
export default function() {
return Store.create({
container: {
lookup(type) {
if (type === "adapter:rest") {
_restAdapter = _restAdapter || RestAdapter.create({ container: this });
return (_restAdapter);
}
},
lookupFactory: function() { }
}
});
}