I have an index view with 45 products and 3 pages.
I'm using pagy_array like :
@pagy, @products = pagy_array(products, items: 20)
If I delete 6 products, I get 39 items on 2 pages. But Google have indexed the third page, and when a customer come on this page, he get an error expected :page in 1..2; got 3
How can I compare the params[:page] to the @pagy.page and made a redirect 301 if bigger ?