summaryrefslogtreecommitdiff
path: root/app/controllers/groups
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-03-23 09:09:58 +0100
committerRémy Coutable <remy@rymai.me>2016-03-23 12:02:15 +0100
commite989d12b0768f0caa7ea1a429a2182e26bbf225a (patch)
tree5fb7e9787cd714cf711b603dc1b0ea389f6df8f8 /app/controllers/groups
parent7dc16346bba174d6075cf438adcd70a5596ba935 (diff)
downloadgitlab-ce-e989d12b0768f0caa7ea1a429a2182e26bbf225a.tar.gz
Use respond_to instead of a conditional to paginate milestones
Diffstat (limited to 'app/controllers/groups')
-rw-r--r--app/controllers/groups/milestones_controller.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/groups/milestones_controller.rb b/app/controllers/groups/milestones_controller.rb
index 0028f072d5b..b23c3022fb5 100644
--- a/app/controllers/groups/milestones_controller.rb
+++ b/app/controllers/groups/milestones_controller.rb
@@ -2,11 +2,15 @@ class Groups::MilestonesController < Groups::ApplicationController
include GlobalMilestones
before_action :group_projects
- before_action :milestones, only: [:index]
before_action :milestone, only: [:show, :update]
before_action :authorize_admin_milestones!, only: [:new, :create, :update]
def index
+ respond_to do |format|
+ format.html do
+ @milestones = Kaminari.paginate_array(milestones).page(params[:page])
+ end
+ end
end
def new