diff options
author | Camil Staps <info@camilstaps.nl> | 2019-01-28 18:51:49 +0100 |
---|---|---|
committer | Camil Staps <info@camilstaps.nl> | 2019-08-07 20:49:15 +0200 |
commit | a052f68116363109b5d49c9738e711a12257ac7d (patch) | |
tree | 4142b923ae57edf3e997501b8ca80955a02f7921 /app/controllers | |
parent | 6baff6504b234e209a5e1d78349dbd2589d5d7e8 (diff) | |
download | gitlab-ce-a052f68116363109b5d49c9738e711a12257ac7d.tar.gz |
Add pagination to {project}/starrers view
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/starrers_controller.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/controllers/projects/starrers_controller.rb b/app/controllers/projects/starrers_controller.rb index 6ca49fceff6..ac105faa550 100644 --- a/app/controllers/projects/starrers_controller.rb +++ b/app/controllers/projects/starrers_controller.rb @@ -6,14 +6,12 @@ class Projects::StarrersController < Projects::ApplicationController # Authorize before_action :require_non_empty_project - # rubocop: disable CodeReuse/ActiveRecord def index @sort = params[:sort].presence || sort_value_name - params[:project] = @project - @starrers = UsersStarProjectsFinder.new(params).execute - @starrers = @starrers.sort_by_attribute(@sort) + @starrers = @starrers.by_project(@project) + + @starrers = @starrers.sort_by_attribute(@sort).page(params[:page]) end - # rubocop: enable CodeReuse/ActiveRecord end |