diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-17 12:57:37 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-17 12:57:37 +0400 |
commit | 2e839cee93bcbf3904f0aeb50206f555c340d672 (patch) | |
tree | 5599394151781decfe55de50318faa2451dac6aa /app/models/concerns/issuable.rb | |
parent | b1bdd82992b5133e24154c8692e25e79049cd907 (diff) |
Fixed tests. Fixed overrided scope. Better usability for milestone view
Diffstat (limited to 'app/models/concerns/issuable.rb')
-rw-r--r-- | app/models/concerns/issuable.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb index 85337583640..11e3d8eed19 100644 --- a/app/models/concerns/issuable.rb +++ b/app/models/concerns/issuable.rb @@ -22,8 +22,10 @@ module Issuable scope :closed, -> { with_state(:closed) } 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 :assigned_to, ->(u) { where(assignee_id: u.id)} scope :recent, -> { order("created_at DESC") } + scope :assigned, -> { where("assignee_id IS NOT NULL") } + scope :unassigned, -> { where("assignee_id IS NULL") } delegate :name, :email, |