diff --git a/Gemfile.lock b/Gemfile.lock index b5279640..b153d9b9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -147,7 +147,7 @@ GEM faraday-httpclient (1.0.1) faraday-multipart (1.0.4) multipart-post (~> 2) - faraday-net_http (1.0.1) + faraday-net_http (1.0.2) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) @@ -286,7 +286,7 @@ GEM omniauth (~> 2.0) openssl (3.2.0) os (1.1.4) - pagy (8.6.3) + pagy (9.0.2) pdf-reader (2.11.0) Ascii85 (~> 1.0) afm (~> 0.2.1) @@ -302,7 +302,7 @@ GEM pry (>= 0.13, < 0.15) psych (5.1.2) stringio - public_suffix (6.0.0) + public_suffix (6.0.1) puma (6.4.2) nio4r (~> 2.0) racc (1.8.0) @@ -404,7 +404,7 @@ GEM searchkick (5.3.1) activemodel (>= 6.1) hashie - selenium-webdriver (4.22.0) + selenium-webdriver (4.23.0) base64 (~> 0.2) logger (~> 1.4) rexml (~> 3.2, >= 3.2.5) @@ -438,7 +438,7 @@ GEM trailblazer-option (0.1.2) ttfunk (1.8.0) bigdecimal (~> 3.1) - turbo-rails (2.0.5) + turbo-rails (2.0.6) actionpack (>= 6.0.0) activejob (>= 6.0.0) railties (>= 6.0.0) diff --git a/app/controllers/invitations_controller.rb b/app/controllers/invitations_controller.rb index 590567f1..d583f860 100644 --- a/app/controllers/invitations_controller.rb +++ b/app/controllers/invitations_controller.rb @@ -5,7 +5,7 @@ class InvitationsController < ApplicationController def index invitations_scope = @track.present? ? Invitation.by_track(@track.id) : Invitation - @pagy, @invitations = pagy(invitations_scope.includes(:editor, :paper).order(created_at: :desc), items: 25) + @pagy, @invitations = pagy(invitations_scope.includes(:editor, :paper).order(created_at: :desc), limit: 25) end def expire diff --git a/config/initializers/pagy.rb b/config/initializers/pagy.rb index ee41e2bd..4e9b082b 100644 --- a/config/initializers/pagy.rb +++ b/config/initializers/pagy.rb @@ -1,10 +1,7 @@ # frozen_string_literal: true # Default page size -Pagy::DEFAULT[:items] = 20 - -# No page links -Pagy::DEFAULT[:size] = [] +Pagy::DEFAULT[:limit] = 20 require 'pagy/extras/overflow' Pagy::DEFAULT[:overflow] = :empty_page diff --git a/spec/views/papers/recent.html.erb_spec.rb b/spec/views/papers/recent.html.erb_spec.rb index b57697e3..0c7065c1 100644 --- a/spec/views/papers/recent.html.erb_spec.rb +++ b/spec/views/papers/recent.html.erb_spec.rb @@ -10,7 +10,7 @@ create(:accepted_paper, submitting_author: user) end - assign(:pagy, Pagy.new({count: Paper.all.count, page: 1})) + assign(:pagy, Pagy.new(count: Paper.all.count, page: 1)) assign(:papers, Paper.all) render template: "papers/index", formats: :html diff --git a/spec/views/papers/submitted.html.erb_spec.rb b/spec/views/papers/submitted.html.erb_spec.rb index 55adc6ae..6cb28338 100644 --- a/spec/views/papers/submitted.html.erb_spec.rb +++ b/spec/views/papers/submitted.html.erb_spec.rb @@ -14,7 +14,7 @@ create(:paper, state: "submitted", submitting_author: user) - assign(:pagy, Pagy.new({count: Paper.submitted.count, page: 1})) + assign(:pagy, Pagy.new(count: Paper.submitted.count, page: 1)) assign(:papers, Paper.submitted) render template: "papers/index", formats: :html