提交 9569a0cd 编写于 作者: R Rafael França 提交者: GitHub

Merge pull request #29866 from rlue/master

[API DOCUMENTATION] [MINOR] Correct description of ActionController::Parameters#delete
...@@ -673,10 +673,10 @@ def transform_keys!(&block) ...@@ -673,10 +673,10 @@ def transform_keys!(&block)
self self
end end
# Deletes and returns a key-value pair from +Parameters+ whose key is equal # Deletes a key-value pair from +Parameters+ and returns the value. If
# to key. If the key is not found, returns the default value. If the # +key+ is not found, returns +nil+ (or, with optional code block, yields
# optional code block is given and the key is not found, pass in the key # +key+ and returns the result). Cf. +#extract!+, which returns the
# and return the result of block. # corresponding +ActionController::Parameters+ object.
def delete(key, &block) def delete(key, &block)
convert_value_to_parameters(@parameters.delete(key, &block)) convert_value_to_parameters(@parameters.delete(key, &block))
end end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册