lib/pagy/extras/trim.rb in pagy-0.19.0 vs lib/pagy/extras/trim.rb in pagy-0.19.1
- old
+ new
@@ -3,10 +3,10 @@
class Pagy
module Frontend
- # boolean used by the compact extra
+ # boolean used by the compact navs
TRIM = true
def pagy_trim_url(url, param_string)
url.sub(/((?:[?&])#{param_string}\z|\b(?<=[?&])#{param_string}&)/, '')
end