use computed

This commit is contained in:
Benjamin Kampmann 2014-07-15 15:43:53 +02:00
parent 6710637904
commit 2435961b58
1 changed files with 3 additions and 5 deletions

View File

@ -25,11 +25,9 @@ Discourse.AdminUserIndexController = Discourse.ObjectController.extend({
primaryGroupDirty: Discourse.computed.propertyNotEqual('originalPrimaryGroupId', 'primary_group_id'),
custom_groups: function(){
return this.get("model.groups").filter(function(g){
return (!g.automatic && g.visible);
});
}.property("model.groups.[]"),
custom_groups: Ember.computed.filter("model.groups", function(g){
return (!g.automatic && g.visible);
}),
actions: {
toggleTitleEdit: function() {