Continue refactoring. Use repostory and team

This commit is contained in:
Dmitriy Zaporozhets 2013-01-04 08:43:25 +02:00
parent 39ba934c0a
commit dccd8b6eaa
42 changed files with 219 additions and 179 deletions

View file

@ -188,7 +188,7 @@ class User < ActiveRecord::Base
# Team membership in personal projects
def tm_in_personal_projects
personal_projects.users_projects.where(user_id: self.id)
UsersProject.where(project_id: personal_projects.map(&:id), user_id: self.id)
end
# Returns a string for use as a Gitolite user identifier