From 1571a78590f87601c0911cce3c5ab983f13817b5 Mon Sep 17 00:00:00 2001 From: neuroalien <105230050+neuroalien@users.noreply.github.com> Date: Sat, 8 Jul 2023 22:49:16 +0100 Subject: [PATCH] AO3-5889 Paginate pseuds using default per page setting 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 @@