Surprisingly there isn’t a Hash#recursive_symbolize_keys
method so here’s code to accomplish that:
1 2 3 4 5 6 7 |
|
Sometimes gems/plugins only take arguments in the form of symbols so this can method can be handy if you have some sort of nested config hash.
Credits to: http://grosser.it/2009/04/14/recursive-symbolize_keys/