summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard_controller.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-11-17 14:33:35 +0100
committerDouwe Maan <douwe@gitlab.com>2015-11-17 14:33:35 +0100
commit7b014338ca94caf4677a035f28469945e6a80100 (patch)
treec442bdae95edb35d14551ca04052227bdb840511 /app/controllers/dashboard_controller.rb
parentbb8b6f38e7fef0afd41088d54d9dda41695ec1c7 (diff)
parent1c040b3f0a3ecb18fc8fdea3cf99b70edad8d873 (diff)
downloadgitlab-ce-contributor-graph-by-email.tar.gz
Merge branch 'master' into contributor-graph-by-emailcontributor-graph-by-email
Diffstat (limited to 'app/controllers/dashboard_controller.rb')
-rw-r--r--app/controllers/dashboard_controller.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb
index 4ebb3d7276e..b2c1fa4230c 100644
--- a/app/controllers/dashboard_controller.rb
+++ b/app/controllers/dashboard_controller.rb
@@ -1,5 +1,6 @@
class DashboardController < Dashboard::ApplicationController
before_action :event_filter, only: :activity
+ before_action :projects, only: [:issues, :merge_requests]
respond_to :html
@@ -47,4 +48,8 @@ class DashboardController < Dashboard::ApplicationController
@events = @event_filter.apply_filter(@events).with_associations
@events = @events.limit(20).offset(params[:offset] || 0)
end
+
+ def projects
+ @projects ||= current_user.authorized_projects.sorted_by_activity.non_archived
+ end
end