Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- app/mongo/lib/mongo_adaptor_server.rb
Overview
We need to be able to deeply stringify keys for mongo
Instance Method Summary collapse
Instance Method Details
#nested_stringify_keys ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'app/mongo/lib/mongo_adaptor_server.rb', line 5 def nested_stringify_keys self.stringify_keys.map do |key, value| if value.is_a?(Hash) value = value.nested_stringify_keys end [key, value] end.to_h end |