Skip to content

Commit

Permalink
Exclude coverage for prepend conditional, ruby < 3.0 syntax for prepend
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Jan 18, 2024
1 parent 25fe110 commit fd0bf65
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/pagy/extras/jsonapi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ def pagy_get_items_size(vars)
end
# Swap the next lines in ruby 3.0+ baseline
# ItemsExtra::Backend.prepend ItemsExtraOverride if defined?(ItemsExtra::Backend)
# :nocov:
Backend.prepend ItemsExtraOverride if defined?(ItemsExtra::Backend)
# :nocov:

# Module overriding UrlHelper
module UrlHelperOverride
Expand All @@ -75,8 +77,8 @@ def pagy_set_query_params(page, vars, params)
end
end
# Swap the next lines in ruby 3.0+ baseline
UrlHelpers.prepend UrlHelperOverride
# Backend.prepend UrlHelperOverride
# Frontend.prepend UrlHelperOverride
# UrlHelpers.prepend UrlHelperOverride
Backend.prepend UrlHelperOverride
Frontend.prepend UrlHelperOverride
end
end

0 comments on commit fd0bf65

Please sign in to comment.