diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-07-24 18:09:08 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-24 18:09:08 -0400 |
commit | 9569a0cde832fcd0aaa078ebb1067e6dd3e22d90 (patch) | |
tree | dde81320bbe351fbbc0376e62d63889be61082ec | |
parent | 39c0362b5796f4e816d13ea0009fc89534a50da6 (diff) | |
parent | 1ae397b5b44eb0bbb797ba63cd9ff63854c4ff06 (diff) | |
download | rails-9569a0cde832fcd0aaa078ebb1067e6dd3e22d90.tar.gz rails-9569a0cde832fcd0aaa078ebb1067e6dd3e22d90.tar.bz2 rails-9569a0cde832fcd0aaa078ebb1067e6dd3e22d90.zip |
Merge pull request #29866 from rlue/master
[API DOCUMENTATION] [MINOR] Correct description of ActionController::Parameters#delete
-rw-r--r-- | actionpack/lib/action_controller/metal/strong_parameters.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb index a1b8b7cd6e..ef61485a70 100644 --- a/actionpack/lib/action_controller/metal/strong_parameters.rb +++ b/actionpack/lib/action_controller/metal/strong_parameters.rb @@ -673,10 +673,10 @@ module ActionController self end - # Deletes and returns a key-value pair from +Parameters+ whose key is equal - # to key. If the key is not found, returns the default value. If the - # optional code block is given and the key is not found, pass in the key - # and return the result of block. + # Deletes a key-value pair from +Parameters+ and returns the value. If + # +key+ is not found, returns +nil+ (or, with optional code block, yields + # +key+ and returns the result). Cf. +#extract!+, which returns the + # corresponding +ActionController::Parameters+ object. def delete(key, &block) convert_value_to_parameters(@parameters.delete(key, &block)) end |