mirror of
https://github.com/internetee/registry.git
synced 2025-07-28 13:36:15 +02:00
13 lines
269 B
Ruby
13 lines
269 B
Ruby
class PartialSearchFormatter
|
|
def self.format(params)
|
|
search_params = params.deep_dup
|
|
|
|
search_params.each do |key, value|
|
|
next unless key.include?('matches') && value.present?
|
|
|
|
search_params[key] = "%#{value}%"
|
|
end
|
|
|
|
search_params
|
|
end
|
|
end
|