Class: ParamSanitizer::Strategies::SpaceToDashStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/param_sanitizer/strategies/space_to_dash_strategy.rb

Instance Method Summary collapse

Instance Method Details

#call(request) ⇒ Object



4
5
6
7
8
# File 'lib/param_sanitizer/strategies/space_to_dash_strategy.rb', line 4

def call(request)
  request.params.each do |key, value|
    request.params[key] = value.strip.gsub(' ', '-') if value
  end
end