Fix auto-group refresh response so that ajax callback runs

This commit is contained in:
Michael Campagnaro
2013-07-26 19:46:42 -04:00
parent 0320a5ae64
commit aa7e96c0fa
3 changed files with 6 additions and 5 deletions

View File

@ -10,9 +10,10 @@ Discourse.AdminGroupsController = Ember.Controller.extend({
var controller = this;
this.set('refreshingAutoGroups', true);
Discourse.ajax('/admin/groups/refresh_automatic_groups', {type: 'POST'}).then(function(){
Discourse.ajax('/admin/groups/refresh_automatic_groups', {type: 'POST'})
.then(function() {
controller.set('model', Discourse.Group.findAll());
controller.set('refreshingAutoGroups',false);
controller.set('refreshingAutoGroups', false);
});
},