This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/routes/group-index.js.es6
Robin Ward 04ec679d82
Fixes some deprecations:
- LoadMore as a Mixin for discovery, groups
- Removed Views for discovery, groups
2016-04-28 15:25:45 -04:00

25 lines
506 B
JavaScript

export function buildIndex(type) {
return Discourse.Route.extend({
type,
model() {
return this.modelFor("group").findPosts({ type });
},
setupController(controller, model) {
this.controllerFor('group-index').setProperties({ model, type });
this.controllerFor("group").set("showing", type);
},
renderTemplate() {
this.render('group-index');
},
actions: {
didTransition() { return true; }
}
});
}
export default buildIndex('posts');