Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'activesupport'
- class Hash
- def recursive_symbolize_keys!
- symbolize_keys! # symbolize_keys is part of activesupport
- values.select { |v| v.is_a?(Hash) }.each { |h| h.recursive_symbolize_keys! }
- self
- end
- end
Add Comment
Please, Sign In to add comment