diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-04-04 12:23:36 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-04-04 12:23:36 +0200 |
commit | b0cd79dd4de85c6c7b2b1429a10c87b9ec457f3e (patch) | |
tree | facdf00c833b890003770fc47c00278dc866c0ef | |
parent | d0e2c4c943462e91ef2d5e7c814ae161454e1ca6 (diff) | |
download | sonarqube-b0cd79dd4de85c6c7b2b1429a10c87b9ec457f3e.tar.gz sonarqube-b0cd79dd4de85c6c7b2b1429a10c87b9ec457f3e.zip |
Minor performance improvement on the management page of group roles
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/helpers/roles_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/roles_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/roles_helper.rb index 77501833196..0e805200f43 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/roles_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/roles_helper.rb @@ -33,7 +33,7 @@ module RolesHelper def groups(role, resource_id=nil) resource_id=(resource_id.blank? ? nil : resource_id.to_i) - group_roles=GroupRole.find(:all, :conditions => {:role => role, :resource_id => resource_id}) + group_roles=GroupRole.find(:all, :include => 'group', :conditions => {:role => role, :resource_id => resource_id}) groups = group_roles.map{|ur| ur.group} Api::Utils.insensitive_sort(groups) {|group| group ? group.name : ''} end |