From 2435961b58a24851d3f364c35f0af424f888894f Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Tue, 15 Jul 2014 15:43:53 +0200 Subject: [PATCH] use computed --- .../admin/controllers/admin_user_controller.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/admin/controllers/admin_user_controller.js b/app/assets/javascripts/admin/controllers/admin_user_controller.js index 5fc95f50502..277be26bd80 100644 --- a/app/assets/javascripts/admin/controllers/admin_user_controller.js +++ b/app/assets/javascripts/admin/controllers/admin_user_controller.js @@ -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() {