Method: Hash#symbolize_keys!
- Defined in:
- activesupport/lib/active_support/core_ext/hash/keys.rb
#symbolize_keys! ⇒ Object Also known as: to_options!
Destructively converts all keys to symbols, as long as they respond to to_sym
. Same as symbolize_keys
, but modifies self
.
34 35 36 |
# File 'activesupport/lib/active_support/core_ext/hash/keys.rb', line 34 def symbolize_keys! transform_keys! { |key| key.to_sym rescue key } end |