Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: check for pagy version #3050

Merged
merged 1 commit into from
Jul 24, 2024
Merged

fix: check for pagy version #3050

merged 1 commit into from
Jul 24, 2024

Conversation

adrianthedev
Copy link
Collaborator

Description

Fixes #3046 (comment)

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Screenshots & recording

Manual review steps

  1. Step 1
  2. Step 2

Manual reviewer: please leave a comment with output from the test if that's the case.

@github-actions github-actions bot added the Fix label Jul 24, 2024
Copy link

codeclimate bot commented Jul 24, 2024

Code Climate has analyzed commit 491dda1 and detected 0 issues on this pull request.

View more on Code Climate.

@@ -28,7 +28,7 @@ def change_items_per_page_url(option)
def render?
return false if discreet_pagination && pagy.pages <= 1

if defined?(@pagy.limit)
if ::Pagy::VERSION > ::Gem::Version.new("9.0")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rubocop] reported by reviewdog 🐶
[Correctable] Style/YodaCondition: Reverse the order of the operands ::Pagy::VERSION > ::Gem::Version.new("9.0").

@@ -1,6 +1,8 @@
require "pagy/extras/trim"
require "pagy/extras/countless"
require "pagy/extras/size"
if ::Pagy::VERSION > ::Gem::Version.new("9.0")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[rubocop] reported by reviewdog 🐶
[Correctable] Style/YodaCondition: Reverse the order of the operands ::Pagy::VERSION > ::Gem::Version.new("9.0").

@adrianthedev adrianthedev merged commit 2983b75 into main Jul 24, 2024
22 of 23 checks passed
@adrianthedev adrianthedev deleted the fix/pagy-before-9 branch July 24, 2024 14:27
Copy link
Contributor

This PR has been merged into main. The functionality will be available in the next release.

Please check the release guide for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant