Fix group duplication on dashboard and project order in group

This commit is contained in:
Dmitriy Zaporozhets 2012-11-29 16:43:09 +02:00
parent ff9a2e2a93
commit 1d889a79fb
4 changed files with 15 additions and 7 deletions

View file

@ -127,7 +127,8 @@ class User < ActiveRecord::Base
def accessed_groups
@accessed_groups ||= begin
groups = Group.where(id: self.projects.pluck(:namespace_id)).all
groups + self.groups
groups = groups + self.groups
groups.uniq
end
end
end