module ActionDispatch::Http::URL

def add_params(path, params)

Experimental RBS support (using type sampling data from the type_fusion project).

def add_params: (String path, Hash params) -> String?

This signature was generated using 57 samples from 2 applications.

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