aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2016-10-22 20:08:26 -0300
committerGitHub <noreply@github.com>2016-10-22 20:08:26 -0300
commite9801ecfd909baf3c5b686013ff01dba9f9b081b (patch)
tree56470681d9455d8d8e3ebfd77d923e07dd550498
parent8447f8d01c3722593ccd345fd7e88be8039ecbf1 (diff)
parentfbda46758bdf4b356df468d92f86111b779265cf (diff)
downloadrails-e9801ecfd909baf3c5b686013ff01dba9f9b081b.tar.gz
rails-e9801ecfd909baf3c5b686013ff01dba9f9b081b.tar.bz2
rails-e9801ecfd909baf3c5b686013ff01dba9f9b081b.zip
Merge pull request #26863 from claudiob/revert-26826
Revert #26826 and add documentation
-rw-r--r--activesupport/lib/active_support/hash_with_indifferent_access.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/hash_with_indifferent_access.rb b/activesupport/lib/active_support/hash_with_indifferent_access.rb
index a56943d99d..7ecc5c19bd 100644
--- a/activesupport/lib/active_support/hash_with_indifferent_access.rb
+++ b/activesupport/lib/active_support/hash_with_indifferent_access.rb
@@ -1,6 +1,5 @@
require "active_support/core_ext/hash/keys"
require "active_support/core_ext/hash/reverse_merge"
-require "active_support/core_ext/hash/indifferent_access"
module ActiveSupport
# Implements a hash where keys <tt>:foo</tt> and <tt>"foo"</tt> are considered
@@ -41,6 +40,12 @@ module ActiveSupport
# rgb = { black: '#000000', white: '#FFFFFF' }.with_indifferent_access
#
# which may be handy.
+ #
+ # To access this class outside of Rails, require the core extension with:
+ #
+ # require "active_support/core_ext/hash/indifferent_access"
+ #
+ # which will, in turn, require this file.
class HashWithIndifferentAccess < Hash
# Returns +true+ so that <tt>Array#extract_options!</tt> finds members of
# this class.