instance method
stringify_keys
Ruby on Rails 3.2.22.5
Since v3.0.20Signature
stringify_keys()
Return a new hash with all keys converted to strings.
{ :name => 'Rob', :years => '28' }.stringify_keys
#=> { "name" => "Rob", "years" => "28" }
Source
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 6
def stringify_keys
dup.stringify_keys!
end
Defined in activesupport/lib/active_support/core_ext/hash/keys.rb line 6
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Hash