module ActionDispatch::Http::URL

def add_params(path, params)

def add_params(path, params)
  params = { params: params } unless params.is_a?(Hash)
  params.reject! { |_, v| v.to_param.nil? }
  query = params.to_query
  path << "?#{query}" unless query.empty?
end