Skip to content

Instantly share code, notes, and snippets.

@trevorturk
Created December 13, 2010 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save trevorturk/739412 to your computer and use it in GitHub Desktop.
Save trevorturk/739412 to your computer and use it in GitHub Desktop.
def filter_params(params)
params.inject({}) do |acc, (k, v)|
acc[k] = if v.is_a?(Hash)
filter_params(v)
else
v.is_a?(Tempfile) ? '[REMOVED: Tempfile]' : v
end
acc
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment