instance method
compiled_filter
Ruby on Rails 3.1.12
Since v3.0.20 Last seen in v5.2.8.1 PrivateSignature
compiled_filter()
No documentation comment.
Source
# File actionpack/lib/action_dispatch/http/parameter_filter.rb, line 23
def compiled_filter
@compiled_filter ||= begin
regexps, blocks = compile_filter
lambda do |original_params|
filtered_params = {}
original_params.each do |key, value|
if regexps.find { |r| key =~ r }
value = '[FILTERED]'
elsif value.is_a?(Hash)
value = filter(value)
elsif value.is_a?(Array)
value = value.map { |v| v.is_a?(Hash) ? filter(v) : v }
elsif blocks.present?
key = key.dup
value = value.dup if value.duplicable?
blocks.each { |b| b.call(key, value) }
end
filtered_params[key] = value
end
filtered_params
end
end
end
Defined in actionpack/lib/action_dispatch/http/parameter_filter.rb line 23
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Http::ParameterFilter