symbolize_keys()
Instance Public methods
Returns a new hash with all keys converted to symbols, as long as they
respond to to_sym
.
hash = { 'name' => 'Rob', 'age' => '28' } hash.symbolize_keys # => { name: "Rob", age: "28" }
Returns a new hash with all keys converted to symbols, as long as they
respond to to_sym
.
hash = { 'name' => 'Rob', 'age' => '28' } hash.symbolize_keys # => { name: "Rob", age: "28" }
Please login to continue.