Commit 984eb08cbe15def95f1cfc2eff32fcb03eb3981b

Authored by Alexey Elizarov
1 parent 26c8b316

Duplicate opened scope for issue

Was it correct?
Showing 1 changed file with 1 additions and 4 deletions   Show diff stats
app/models/issue.rb
... ... @@ -28,7 +28,7 @@ class Issue < ActiveRecord::Base
28 28  
29 29 scope :of_group, ->(group) { where(project_id: group.project_ids) }
30 30 scope :of_user_team, ->(team) { where(project_id: team.project_ids, assignee_id: team.member_ids) }
31   - scope :opened, -> { with_state(:opened) }
  31 + scope :opened, -> { with_state(:opened, :reopened) }
32 32 scope :closed, -> { with_state(:closed) }
33 33  
34 34 attr_accessible :title, :assignee_id, :position, :description,
... ... @@ -56,9 +56,6 @@ class Issue < ActiveRecord::Base
56 56 state :closed
57 57 end
58 58  
59   - # Both open and reopened issues should be listed as opened
60   - scope :opened, -> { with_state(:opened, :reopened) }
61   -
62 59 # Mentionable overrides.
63 60  
64 61 def gfm_reference
... ...