summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard_controller.rb
diff options
context:
space:
mode:
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