module ActionDispatch::Http::TruncateParameters
Public Instance Methods
filtered_parameters()
click to toggle source
Calls superclass method
# File lib/action_dispatch/http/truncate_parameters.rb, line 7 def filtered_parameters params_truncate super end
params_truncate(original_params)
click to toggle source
# File lib/action_dispatch/http/truncate_parameters.rb, line 11 def params_truncate(original_params) truncated_params = original_params.class.new original_params.each do |k, v| truncated_params[k] = if v.is_a?(Hash) params_truncate(v) else truncate(v) end end truncated_params end
truncate(value)
click to toggle source
# File lib/action_dispatch/http/truncate_parameters.rb, line 23 def truncate(value) bytesize = value.bytesize if bytesize >= 1.kilobyte "[TRUNCATE #{bytesize.to_s(:human_size)}]" else value end end