summaryrefslogtreecommitdiff
path: root/app/models/concerns/issuable.rb
diff options
context:
space:
mode:
authorAndrey Kumanyaev <me@zzet.org>2013-01-19 21:06:50 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-01-24 22:31:23 +0200
commit8a86fe7bb0785ea69e591fd287430eb5448ac64e (patch)
tree3a171350b30d25daf82b867448d5d88fc78210f8 /app/models/concerns/issuable.rb
parentf6c482c06f48449e7dcff34455b5bbdfbd8f6c7b (diff)
downloadgitlab-ce-8a86fe7bb0785ea69e591fd287430eb5448ac64e.tar.gz
Added UserTeam core models (team and m-t-m relationships) and updated other models
Diffstat (limited to 'app/models/concerns/issuable.rb')
-rw-r--r--app/models/concerns/issuable.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb
index d1717d3bbee..8872cf59a2c 100644
--- a/app/models/concerns/issuable.rb
+++ b/app/models/concerns/issuable.rb
@@ -22,6 +22,7 @@ module Issuable
scope :opened, where(closed: false)
scope :closed, where(closed: true)
scope :of_group, ->(group) { where(project_id: group.project_ids) }
+ scope :of_user_team, ->(team) { where(project_id: team.project_ids, assignee_id: team.member_ids) }
scope :assigned, ->(u) { where(assignee_id: u.id)}
scope :recent, order("created_at DESC")