instance method
symbolize_keys!
Ruby on Rails 7.0.10
Since v3.0.20Signature
symbolize_keys!()
Destructively converts all keys to symbols, as long as they respond to to_sym. Same as symbolize_keys, but modifies self.
Source
# File activesupport/lib/active_support/core_ext/hash/keys.rb, line 34
def symbolize_keys!
transform_keys! { |key| key.to_sym rescue key }
end
Defined in activesupport/lib/active_support/core_ext/hash/keys.rb line 34
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Hash