summaryrefslogtreecommitdiff
path: root/app/helpers/namespaces_helper.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-11-05 17:15:43 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-11-05 17:15:43 +0200
commitb813a4888a8755a0944fbe96c6fd35485137bf3c (patch)
treeffa869e6fa72c07722486e79d23162931fa24e54 /app/helpers/namespaces_helper.rb
parent6424ec936e4faa1d236579714efc825939766ce9 (diff)
downloadgitlab-ce-b813a4888a8755a0944fbe96c6fd35485137bf3c.tar.gz
Remove User#namespaces method from code
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
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 dc88e178360..f7979c8b641 100644
--- a/app/helpers/namespaces_helper.rb
+++ b/app/helpers/namespaces_helper.rb
@@ -1,7 +1,7 @@
module NamespacesHelper
def namespaces_options(selected = :current_user, scope = :default)
- groups = current_user.owned_groups.select {|n| n.type == 'Group'}
- users = current_user.namespaces.reject {|n| n.type == 'Group'}
+ groups = current_user.owned_groups
+ users = [current_user.namespace]
group_opts = ["Groups", groups.sort_by(&:human_name).map {|g| [g.human_name, g.id]} ]
users_opts = [ "Users", users.sort_by(&:human_name).map {|u| [u.human_name, u.id]} ]