From 7f43395f313a26ce0bff06eb91c1f0f3b65affdf Mon Sep 17 00:00:00 2001 From: neuroalien <105230050+neuroalien@users.noreply.github.com> Date: Tue, 11 Jul 2023 04:07:10 +0100 Subject: [PATCH] AO3-5889 Paginate pseuds using default per page setting (#4569) We're also adding alphabetical sorting to the pseuds. --- app/controllers/pseuds_controller.rb | 2 +- app/views/pseuds/index.html.erb | 5 ++++- features/other_a/pseuds.feature | 9 +++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/controllers/pseuds_controller.rb b/app/controllers/pseuds_controller.rb index 50eec2b5bb9..f1e03bb0d32 100644 --- a/app/controllers/pseuds_controller.rb +++ b/app/controllers/pseuds_controller.rb @@ -14,7 +14,7 @@ def load_user # GET /pseuds.xml def index if @user - @pseuds = @user.pseuds + @pseuds = @user.pseuds.alphabetical.paginate(page: params[:page]) @rec_counts = Pseud.rec_counts_for_pseuds(@pseuds) @work_counts = Pseud.work_counts_for_pseuds(@pseuds) @page_subtitle = @user.login diff --git a/app/views/pseuds/index.html.erb b/app/views/pseuds/index.html.erb index f6ff829cf04..db2071ecbe6 100644 --- a/app/views/pseuds/index.html.erb +++ b/app/views/pseuds/index.html.erb @@ -9,6 +9,7 @@