Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamil Staps <info@camilstaps.nl>2019-01-28 20:51:49 +0300
committerCamil Staps <info@camilstaps.nl>2019-08-07 21:49:15 +0300
commita052f68116363109b5d49c9738e711a12257ac7d (patch)
tree4142b923ae57edf3e997501b8ca80955a02f7921 /app/controllers/projects/starrers_controller.rb
parent6baff6504b234e209a5e1d78349dbd2589d5d7e8 (diff)
Add pagination to {project}/starrers view
Diffstat (limited to 'app/controllers/projects/starrers_controller.rb')
-rw-r--r--app/controllers/projects/starrers_controller.rb8
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