diff options
author | Damien Mathieu <42@dmathieu.com> | 2013-10-29 17:00:45 +0100 |
---|---|---|
committer | Damien Mathieu <42@dmathieu.com> | 2013-10-29 20:37:15 +0100 |
commit | 84c9f4164bbd5f3d2697949bdd2cdbd15ce6091e (patch) | |
tree | aa9262a5a74a9bbfea4bd2bffe0cbd411b95873c /actionpack/CHANGELOG.md | |
parent | df2226ea16922fd4e2ea72b8ee372a4cb5621114 (diff) | |
download | rails-84c9f4164bbd5f3d2697949bdd2cdbd15ce6091e.tar.gz rails-84c9f4164bbd5f3d2697949bdd2cdbd15ce6091e.tar.bz2 rails-84c9f4164bbd5f3d2697949bdd2cdbd15ce6091e.zip |
add the fetch method to sessions
Diffstat (limited to 'actionpack/CHANGELOG.md')
-rw-r--r-- | actionpack/CHANGELOG.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index f5527450c7..b8ba48f8f9 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -1,3 +1,15 @@ +* Add `session#fetch` method + + fetch behaves like [Hash#fetch](http://www.ruby-doc.org/core-1.9.3/Hash.html#method-i-fetch). + It returns a value from the hash for the given key. + If the key can’t be found, there are several options: + + * With no other arguments, it will raise an KeyError exception. + * If a default value is given, then that will be returned. + * If the optional code block is specified, then that will be run and its result returned. + + *Damien Mathieu* + * Don't let strong parameters mutate the given hash via `fetch` Create a new instance if the given parameter is a `Hash` instead of |