© 2017-2020 Domizio DemichelisMIT License

➡ Chat Support on Gitter ➡

Trim Extra

This extra removes the page=1 param from the link of the first page. You need only to require the extra in the initializer file.

This extra is needed only for very specific scenarios, for example if you need to avoid frontend cache duplicates.


See extras for general usage info.

In the pagy.rb initializer:

require 'pagy/extras/trim'



The trim extra overrides the pagy_link_proc method in the Pagy::Frontend module.

This method trims the :page_param param from the first page link. It is alias-chained with *_with_trim and *_without_trim.