mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add changelog entry for #32446
In #32446 was added method `dig` to `session`. Improve docs of method `dig`. [ci skip]
This commit is contained in:
parent
475a2911bb
commit
15331a2ac4
2 changed files with 6 additions and 2 deletions
|
@ -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`.
|
||||
|
||||
|
|
|
@ -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 }
|
||||
|
|
Loading…
Reference in a new issue