Guest User

Untitled

a guest
Jul 17th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. def filter_params(params)
  2. params.inject({}) do |acc, (k, v)|
  3. acc[k] = if v.is_a?(Hash)
  4. filter_params(v)
  5. else
  6. v.is_a?(Tempfile) ? '[REMOVED: Tempfile]' : v
  7. end
  8. acc
  9. end
  10. end
Add Comment
Please, Sign In to add comment