Class: Merb::Controller

Inherits:
Object
  • Object
show all
Defined in:
lib/merb-param-protection.rb

Class Method Summary collapse

Class Method Details

._filter_params(params) ⇒ Object

Filters parameters so they are not showed in logs



187
188
189
190
191
192
193
194
# File 'lib/merb-param-protection.rb', line 187

def self._filter_params(params)
  return params if self.log_params_args.nil?
  result = { }
  params.each do |k,v|
    result[k] = (self.log_params_args.include?(k.to_s) ? '[FILTERED]' : v)
  end
  result
end