Skip to content

Commit

Permalink
AS guide: documents Hash#with_indifferent_access
Browse files Browse the repository at this point in the history
  • Loading branch information
fxn committed Sep 12, 2009
1 parent ebe1775 commit 8d0fa40
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions railties/guides/source/active_support_overview.textile
Expand Up @@ -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+

...
Expand Down

0 comments on commit 8d0fa40

Please sign in to comment.