Context refactoring. Move Issues list, Search logic to context

This commit is contained in:
randx 2012-10-09 22:09:46 +03:00
parent 63fe042d97
commit 679d0d6d76
15 changed files with 100 additions and 83 deletions

View file

@ -1,5 +1,4 @@
# Contains common functionality
# shared between Issues and MergeRequests
# Contains common functionality shared between Issues and MergeRequests
module IssueCommonality
extend ActiveSupport::Concern
@ -18,6 +17,7 @@ module IssueCommonality
scope :closed, where(closed: true)
scope :of_group, ->(group) { where(project_id: group.project_ids) }
scope :assigned, ->(u) { where(assignee_id: u.id)}
scope :recent, order("created_at DESC")
delegate :name,
:email,