discourse/app/assets/javascripts/admin/routes/admin-group.js.es6
2015-08-13 10:01:29 -04:00

19 lines
435 B
JavaScript

export default Discourse.Route.extend({
model: function(params) {
var groups = this.modelFor('adminGroupsType'),
group = groups.findProperty('name', params.name);
if (!group) { return this.transitionTo('adminGroups.index'); }
return group;
},
setupController: function(controller, model) {
controller.set("model", model);
controller.set("model.usernames", null);
model.findMembers();
}
});