summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard_controller.rb
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2012-10-03 12:17:48 +0000
committerValery Sizov <vsv2711@gmail.com>2012-10-03 12:17:48 +0000
commit9e80d2d4f79edf81185461a34a50adcd251073f1 (patch)
tree591cc21b8f48b9cafda4fbf7554bb093300bc8e9 /app/controllers/dashboard_controller.rb
parentdc22dd8aded81f10b8b9fc06f8c423043aa01d0a (diff)
parentc8412bc9edbbed7a38cc4880f0d8cbb9091eb1d9 (diff)
downloadgitlab-ce-9e80d2d4f79edf81185461a34a50adcd251073f1.tar.gz
Merge branch 'feature/groups' of dev.gitlabhq.com:gitlabhq
Diffstat (limited to 'app/controllers/dashboard_controller.rb')
-rw-r--r--app/controllers/dashboard_controller.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb
index 7696e97a7b2..1f142dae4c4 100644
--- a/app/controllers/dashboard_controller.rb
+++ b/app/controllers/dashboard_controller.rb
@@ -2,7 +2,10 @@ class DashboardController < ApplicationController
respond_to :html
def index
- @projects = current_user.projects_with_events.page(params[:page]).per(40)
+ @groups = Group.where(id: current_user.projects.pluck(:group_id))
+ @projects = current_user.projects_with_events
+ @projects = @projects.page(params[:page]).per(40)
+
@events = Event.recent_for_user(current_user).limit(20).offset(params[:offset] || 0)
@last_push = current_user.recent_push