提交 173b1128 编写于 作者: J James Lopez 提交者: James Lopez

Fix namespace helper - use pluck instead of slower map version.

上级 0c65112d
......@@ -31,7 +31,7 @@ module NamespacesHelper
def process_extra_groups(extra_groups)
# Remove duplicate groups - we either keep the ones that exist for the user
# (already in groups) or ignore those that do not belong to the user.
duplicated_groups = extra_groups.map { |name| Namespace.where(name: name).map(&:name) }
duplicated_groups = extra_groups.map { |name| Namespace.where(name: name).pluck(:name) }
extra_groups = extra_groups - duplicated_groups.flatten
extra_groups.map { |name| Group.new(name: name) }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册