diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2018-11-01 13:21:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-01 13:21:09 -0400 |
commit | d80925b169f0db950697868f5659a67cc03e8654 (patch) | |
tree | e7bbfbb1db57b4aff6e44f86d90aeb09ef309b8c /activesupport/lib/active_support | |
parent | 7ac05a804d1f204ced084ed141e5aa00e4caeb3e (diff) | |
parent | 4ba5386e6c647b285490b0a9f44fcf617daeda41 (diff) | |
download | rails-d80925b169f0db950697868f5659a67cc03e8654.tar.gz rails-d80925b169f0db950697868f5659a67cc03e8654.tar.bz2 rails-d80925b169f0db950697868f5659a67cc03e8654.zip |
Merge pull request #34360 from weilandia/34359_hash_with_indifferent_access_to_options
Make ActiveSupport HashWithIndifferentAccess#to_options and alias for HashWithIndifferentAccess#symbolize_keys
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/hash_with_indifferent_access.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/hash_with_indifferent_access.rb b/activesupport/lib/active_support/hash_with_indifferent_access.rb index 2fac579469..f1af76019a 100644 --- a/activesupport/lib/active_support/hash_with_indifferent_access.rb +++ b/activesupport/lib/active_support/hash_with_indifferent_access.rb @@ -289,6 +289,7 @@ module ActiveSupport undef :symbolize_keys! undef :deep_symbolize_keys! def symbolize_keys; to_hash.symbolize_keys! end + alias_method :to_options, :symbolize_keys def deep_symbolize_keys; to_hash.deep_symbolize_keys! end def to_options!; self end |