discourse/app/assets/javascripts/admin/routes/admin_group_route.js

18 lines
399 B
JavaScript
Raw Normal View History

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