Guest User

Untitled

a guest
Apr 24th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. require 'activesupport'
  2.  
  3. class Hash
  4. def recursive_symbolize_keys!
  5. symbolize_keys! # symbolize_keys is part of activesupport
  6. values.select { |v| v.is_a?(Hash) }.each { |h| h.recursive_symbolize_keys! }
  7. self
  8. end
  9. end
Add Comment
Please, Sign In to add comment