diff options
author | bogdanvlviv <bogdanvlviv@gmail.com> | 2018-04-06 15:02:44 +0300 |
---|---|---|
committer | bogdanvlviv <bogdanvlviv@gmail.com> | 2018-04-06 16:50:38 +0300 |
commit | 15331a2ac4113673d4948eda03e33d0d11d9f335 (patch) | |
tree | 457a7e608123db44337f8df2bfefde9a5bd6d072 /actionpack | |
parent | 475a2911bb17fabea99f14d3ce1497ae77aebb39 (diff) | |
download | rails-15331a2ac4113673d4948eda03e33d0d11d9f335.tar.gz rails-15331a2ac4113673d4948eda03e33d0d11d9f335.tar.bz2 rails-15331a2ac4113673d4948eda03e33d0d11d9f335.zip |
Add changelog entry for #32446
In #32446 was added method `dig` to `session`.
Improve docs of method `dig`.
[ci skip]
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/CHANGELOG.md | 4 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/request/session.rb | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index 9835733b17..76342f7108 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -1,3 +1,7 @@ +* Add method `dig` to `session`. + + *claudiob*, *Takumi Shotoku* + * Controller level `force_ssl` has been deprecated in favor of `config.force_ssl`. diff --git a/actionpack/lib/action_dispatch/request/session.rb b/actionpack/lib/action_dispatch/request/session.rb index 2ff651fc31..bc5e0670e0 100644 --- a/actionpack/lib/action_dispatch/request/session.rb +++ b/actionpack/lib/action_dispatch/request/session.rb @@ -93,8 +93,8 @@ module ActionDispatch @delegate[key.to_s] end - # Returns the nested value specified by the sequence of key, returning - # nil if any intermediate step is nil. + # Returns the nested value specified by the sequence of keys, returning + # +nil+ if any intermediate step is +nil+. def dig(*keys) load_for_read! keys = keys.map.with_index { |key, i| i.zero? ? key.to_s : key } |