Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-19 02:16:13 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-19 02:16:13 +0300
commit716544085ce3d100f466103ba5d7c00a771ba6ca (patch)
tree8582700fc786abdbb73cd54485432274eb3d9321 /app
parent558dd811971776fc4a921b79296f5d792b245686 (diff)
Get contributed projects for last year only
Diffstat (limited to 'app')
-rw-r--r--app/models/user.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index ba148f492a4..3bbbd23c1bd 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -610,6 +610,7 @@ class User < ActiveRecord::Base
def contributed_projects_ids
Event.where(author_id: self).
+ where("created_at > ?", Time.now - 1.year).
code_push.
reorder(project_id: :desc).
select('DISTINCT(project_id)').