module Pagy::UrlHelpers

def pagy_deprecated_params(pagy, params) # remove in 6.0

remove in 6.0
Transitional code to handle params deprecations. It will be removed in version 6.0
def pagy_deprecated_params(pagy, params)    # remove in 6.0
  if pagy.params.is_a?(Proc)                # new code
    pagy.params.call(params)
  elsif respond_to?(:pagy_massage_params)   # deprecated code
    Warning.warn '[PAGY WARNING] The pagy_massage_params method has been deprecated and it will be ignored from version 6. ' \
                 'Set the :params variable to a Proc with the same code as the pagy_massage_params method.'
    pagy_massage_params(params)
  else
    params                                  # no massage params
  end
end