diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-11-05 17:15:43 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-11-05 17:15:43 +0200 |
commit | b813a4888a8755a0944fbe96c6fd35485137bf3c (patch) | |
tree | ffa869e6fa72c07722486e79d23162931fa24e54 /app/helpers/namespaces_helper.rb | |
parent | 6424ec936e4faa1d236579714efc825939766ce9 (diff) | |
download | gitlab-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.rb | 4 |
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]} ] |