diff options
| author | Rémy Coutable <remy@rymai.me> | 2016-03-23 09:09:58 +0100 |
|---|---|---|
| committer | Rémy Coutable <remy@rymai.me> | 2016-03-23 12:02:15 +0100 |
| commit | e989d12b0768f0caa7ea1a429a2182e26bbf225a (patch) | |
| tree | 5fb7e9787cd714cf711b603dc1b0ea389f6df8f8 /app/controllers/groups | |
| parent | 7dc16346bba174d6075cf438adcd70a5596ba935 (diff) | |
| download | gitlab-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.rb | 6 |
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 |
