diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-19 01:20:26 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-19 01:20:26 +0300 |
commit | 138aa81e60f18214e0a95a6ffc6ec1ddbc27925a (patch) | |
tree | 92c6d756e0bb651a6f384fc0a1e6f58eb9eca4a0 /app | |
parent | 93dde8a312dbe2359c020c582d84cfd35a1085fe (diff) |
Get contributed projects only if push event exists
Diffstat (limited to 'app')
-rw-r--r-- | app/models/user.rb | 1 | ||||
-rw-r--r-- | app/views/users/calendar.html.haml | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index ed9a0168747..ba148f492a4 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). + code_push. reorder(project_id: :desc). select('DISTINCT(project_id)'). map(&:project_id) diff --git a/app/views/users/calendar.html.haml b/app/views/users/calendar.html.haml index 13bdc5ed1e7..1d1c974da24 100644 --- a/app/views/users/calendar.html.haml +++ b/app/views/users/calendar.html.haml @@ -1,4 +1,4 @@ -%h4 Calendar +%h4 Commits calendar #cal-heatmap.calendar :javascript new calendar( |