diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-18 15:16:13 -0800 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-18 15:16:13 -0800 |
| commit | 716544085ce3d100f466103ba5d7c00a771ba6ca (patch) | |
| tree | 8582700fc786abdbb73cd54485432274eb3d9321 | |
| parent | 558dd811971776fc4a921b79296f5d792b245686 (diff) | |
| download | gitlab-ce-716544085ce3d100f466103ba5d7c00a771ba6ca.tar.gz | |
Get contributed projects for last year only
| -rw-r--r-- | app/models/user.rb | 1 |
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)'). |
