lib/pagy/extras/trim.rb in pagy-8.6.3 vs lib/pagy/extras/trim.rb in pagy-9.0.0

- old
+ new

@@ -4,12 +4,12 @@ class Pagy # :nodoc: DEFAULT[:trim_extra] = true # extra enabled by default # Remove the page=1 param from the first page link module TrimExtra - # Override the original pagy_a_proc. + # Override the original pagy_anchor. # Call the pagy_trim method for page 1 if the trim_extra is enabled - def pagy_anchor(pagy) + def pagy_anchor(pagy, **_) a_proc = super return a_proc unless pagy.vars[:trim_extra] lambda do |page, text = pagy.label_for(page), **opts| a = +a_proc.(page, text, **opts)