Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Moskalchuk <dm@crystax.net>2013-02-16 19:40:33 +0400
committerDmitry Moskalchuk <dm@crystax.net>2013-02-16 19:40:33 +0400
commita9c1b85e08e7e6ed1f209b8a5e2b43ea3b91dbb4 (patch)
treef0b6124994fa022a7dd8e8f396887fb48f1fd8fb /app/helpers/namespaces_helper.rb
parent2a4ef0fe4941f6d17e22b8066a0fb9f6aabc2780 (diff)
Sort groups/namespaces by human name
Diffstat (limited to 'app/helpers/namespaces_helper.rb')
-rw-r--r--app/helpers/namespaces_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/namespaces_helper.rb b/app/helpers/namespaces_helper.rb
index 6d0c6c98191..b19851889a7 100644
--- a/app/helpers/namespaces_helper.rb
+++ b/app/helpers/namespaces_helper.rb
@@ -10,8 +10,8 @@ module NamespacesHelper
global_opts = ["Global", [['/', Namespace.global_id]] ]
- group_opts = ["Groups", groups.map {|g| [g.human_name, g.id]} ]
- users_opts = [ "Users", users.map {|u| [u.human_name, u.id]} ]
+ group_opts = ["Groups", groups.sort_by {|g| g.human_name}.map {|g| [g.human_name, g.id]} ]
+ users_opts = [ "Users", users.sort_by {|u| u.human_name}.map {|u| [u.human_name, u.id]} ]
options = []
options << global_opts if current_user.admin