diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-17 15:55:41 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-18 18:47:52 +0400 |
commit | 209f96bebeaf012ba941f2f8b1e659dd2334b5a1 (patch) | |
tree | 86cab358c0efb5eb3e5c041e958a0a3345070437 /app/models/project_team.rb | |
parent | e940fbc7c1b322c15f5d5ae878fbd3117e9b98f9 (diff) |
Use project.team over project.users
Diffstat (limited to 'app/models/project_team.rb')
-rw-r--r-- | app/models/project_team.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/project_team.rb b/app/models/project_team.rb index d84d46431f5..7f8a00d077c 100644 --- a/app/models/project_team.rb +++ b/app/models/project_team.rb @@ -21,6 +21,11 @@ class ProjectTeam end end + def find user_id + user = project.users.find_by_id(user_id) + user ||= project.group.users.find_by_id(user_id) + end + def get_tm user_id project.users_projects.find_by_user_id(user_id) end |