profjects filter with_push to project model
This commit is contained in:
parent
8543313bf5
commit
f716c0a1dd
2 changed files with 5 additions and 1 deletions
|
@ -92,6 +92,10 @@ class Project < ActiveRecord::Base
|
|||
where(id: project_ids)
|
||||
end
|
||||
|
||||
def with_push
|
||||
includes(:events).where('events.action = ?', Event::Pushed)
|
||||
end
|
||||
|
||||
def active
|
||||
joins(:issues, :notes, :merge_requests).order("issues.created_at, notes.created_at, merge_requests.created_at DESC")
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue