Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

AS guide: documents Hash#with_indifferent_access

  • Loading branch information...
commit 8d0fa4054e1564a6592416e854742661406c5c28 1 parent ebe1775
@fxn fxn authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 railties/guides/source/active_support_overview.textile
View
8 railties/guides/source/active_support_overview.textile
@@ -1190,6 +1190,14 @@ params[:account] = params[:account].except(:plan_id) unless admin?
There's also the bang variant +except!+ that removes keys in the very receiver.
+h4. Indifferent Access
+
+The method +with_indifferent_access+ returns an +ActiveSupport::HashWithIndifferentAccess+ out of its receiver:
+
+<ruby>
+{:a => 1}.with_indifferent_access["a"] # => 1
+</ruby>
+
h3. Extensions to +Range+
...
Please sign in to comment.
Something went wrong with that request. Please try again.