diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b12087..297b948 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -118,7 +118,7 @@ jobs: - uses: ruby/setup-ruby@v1 with: - ruby-version: 3.1 + ruby-version: 3.2 bundler-cache: true - name: Rubocop diff --git a/app/controllers/inner_performance/events_controller.rb b/app/controllers/inner_performance/events_controller.rb index a6cc88c..a6098a1 100644 --- a/app/controllers/inner_performance/events_controller.rb +++ b/app/controllers/inner_performance/events_controller.rb @@ -2,7 +2,7 @@ module InnerPerformance class EventsController < ApplicationController - include Pagy::Backend + include Pagy::Method def index @q = InnerPerformance::Event.all.ransack(params[:q]) diff --git a/app/helpers/inner_performance/application_helper.rb b/app/helpers/inner_performance/application_helper.rb index 54d30ee..222b488 100644 --- a/app/helpers/inner_performance/application_helper.rb +++ b/app/helpers/inner_performance/application_helper.rb @@ -2,8 +2,6 @@ module InnerPerformance module ApplicationHelper - include Pagy::Frontend - # Based on https://stackoverflow.com/a/45428183/552936 and # https://datadome.co/learning-center/how-to-reduce-server-response-time/ def row_class_from_duration(duration) diff --git a/app/views/inner_performance/events/index.html.erb b/app/views/inner_performance/events/index.html.erb index dec7c76..8d8dd33 100644 --- a/app/views/inner_performance/events/index.html.erb +++ b/app/views/inner_performance/events/index.html.erb @@ -36,4 +36,4 @@ -<%== pagy_nav(@pagy) if @pagy.pages > 1 %> +<%== @pagy.series_nav if @pagy.pages > 1 %> diff --git a/inner_performance.gemspec b/inner_performance.gemspec index 0ba61da..b6f57b5 100644 --- a/inner_performance.gemspec +++ b/inner_performance.gemspec @@ -18,12 +18,14 @@ Gem::Specification.new do |spec| spec.metadata["source_code_uri"] = "https://github.com/mbajur/inner_performance" spec.metadata["changelog_uri"] = "https://github.com/mbajur/inner_performance" + spec.required_ruby_version = ">= 3.2" + spec.files = Dir.chdir(File.expand_path(__dir__)) do Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"] end spec.add_dependency("activejob", ">= 7.1.5") - spec.add_dependency("pagy", ">= 9.3.1") + spec.add_dependency("pagy", ">= 43.0.6") spec.add_dependency("rails", ">= 7.1.5") spec.add_dependency("ransack", ">= 4.2.1")