summaryrefslogtreecommitdiff
path: root/app/controllers/dashboard
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-03-22 19:19:53 +0100
committerRémy Coutable <remy@rymai.me>2016-03-23 12:02:15 +0100
commit7dc16346bba174d6075cf438adcd70a5596ba935 (patch)
treebdb093b32967dae0946476747a223124ee65f09f /app/controllers/dashboard
parent703f7c5d579a6ab6d7592c24f8e3f2813d9d1703 (diff)
downloadgitlab-ce-7dc16346bba174d6075cf438adcd70a5596ba935.tar.gz
Fix an issue causing the Dashboard/Milestones page to be blank
Diffstat (limited to 'app/controllers/dashboard')
-rw-r--r--app/controllers/dashboard/application_controller.rb6
-rw-r--r--app/controllers/dashboard/milestones_controller.rb12
2 files changed, 12 insertions, 6 deletions
diff --git a/app/controllers/dashboard/application_controller.rb b/app/controllers/dashboard/application_controller.rb
index 962ea38d6c9..9d3d1c23c28 100644
--- a/app/controllers/dashboard/application_controller.rb
+++ b/app/controllers/dashboard/application_controller.rb
@@ -1,3 +1,9 @@
class Dashboard::ApplicationController < ApplicationController
layout 'dashboard'
+
+ private
+
+ def projects
+ @projects ||= current_user.authorized_projects.sorted_by_activity.non_archived
+ end
end
diff --git a/app/controllers/dashboard/milestones_controller.rb b/app/controllers/dashboard/milestones_controller.rb
index 2bdce0f8a00..0a4a4088404 100644
--- a/app/controllers/dashboard/milestones_controller.rb
+++ b/app/controllers/dashboard/milestones_controller.rb
@@ -6,14 +6,14 @@ class Dashboard::MilestonesController < Dashboard::ApplicationController
before_action :milestone, only: [:show]
def index
+ respond_to do |format|
+ format.html
+ format.json do
+ render json: @milestones
+ end
+ end
end
def show
end
-
- private
-
- def projects
- @projects ||= current_user.authorized_projects.sorted_by_activity.non_archived
- end
end