Commit 9fd42afb authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Refactor Project.abandoned method

parent 5468cd27444f
......@@ -110,11 +110,7 @@
class << self
def abandoned
project_ids = Event.select('max(created_at) as latest_date, project_id').
group('project_id').
having('latest_date < ?', 6.months.ago).map(&:project_id)
where(id: project_ids)
where('projects.last_activity_at < ?', 6.months.ago)
end
def with_push
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment