summaryrefslogtreecommitdiff
path: root/app/controllers/explore/projects_controller.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2021-01-20 13:34:23 -0600
committerRobert Speicher <rspeicher@gmail.com>2021-01-20 13:34:23 -0600
commit6438df3a1e0fb944485cebf07976160184697d72 (patch)
tree00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/controllers/explore/projects_controller.rb
parent42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff)
downloadgitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/controllers/explore/projects_controller.rb')
-rw-r--r--app/controllers/explore/projects_controller.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/controllers/explore/projects_controller.rb b/app/controllers/explore/projects_controller.rb
index d210d0f66fd..1fd3cfd11f9 100644
--- a/app/controllers/explore/projects_controller.rb
+++ b/app/controllers/explore/projects_controller.rb
@@ -9,13 +9,16 @@ class Explore::ProjectsController < Explore::ApplicationController
include SortingPreference
MIN_SEARCH_LENGTH = 3
+ PAGE_LIMIT = 50
before_action :set_non_archived_param
before_action :set_sorting
- # Limit taken from https://gitlab.com/gitlab-org/gitlab/issues/38357
+ # For background information on the limit, see:
+ # https://gitlab.com/gitlab-org/gitlab/-/issues/38357
+ # https://gitlab.com/gitlab-org/gitlab/-/issues/262682
before_action only: [:index, :trending, :starred] do
- limit_pages(200)
+ limit_pages(PAGE_LIMIT)
end
rescue_from PageOutOfBoundsError, with: :page_out_of_bounds