Unverified Commit 7e1901ab authored by Yorick Peterse's avatar Yorick Peterse
Browse files

Disable page numbers for all project dashboards

This disables page number based pagination for all project dashboards,
instead of only doing so for the "Explore Projects" page. This removes
the need for running expensive COUNT(*) queries (depending on how many
projects you have access to) and keeps the pagination consistent on the
various project dashboard pages.
parent e6f20e52
......@@ -5,7 +5,9 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
before_action :default_sorting
def index
@projects = load_projects(params.merge(non_public: true)).page(params[:page])
@projects = load_projects(params.merge(non_public: true))
.page(params[:page])
.without_count
respond_to do |format|
format.html
......@@ -23,7 +25,9 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
def starred
@projects = load_projects(params.merge(starred: true))
.includes(:forked_from_project, :tags).page(params[:page])
.includes(:forked_from_project, :tags)
.page(params[:page])
.without_count
@groups = []
......
---
title: Disable page numbers for all project dashboards
merge_request:
author:
type: other
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment