diff options
author | Ryan Lue <ryan.lue@gmail.com> | 2017-07-20 16:58:30 +0800 |
---|---|---|
committer | Ryan Lue <ryan.lue@gmail.com> | 2017-07-20 16:58:30 +0800 |
commit | d75d9da1746b1a5cda581b7c86d1bcb2bc565c27 (patch) | |
tree | 4975e526695db8655b4d4ec549cb96964a754782 /actionpack/lib/action_controller | |
parent | 526d4b8dc816c17e354e2e0243af16d10147c3f0 (diff) | |
download | rails-d75d9da1746b1a5cda581b7c86d1bcb2bc565c27.tar.gz rails-d75d9da1746b1a5cda581b7c86d1bcb2bc565c27.tar.bz2 rails-d75d9da1746b1a5cda581b7c86d1bcb2bc565c27.zip |
Correct API documentation for ActionController::Parameters#delete
Diffstat (limited to 'actionpack/lib/action_controller')
-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..c768ac1cff 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::Paramters+ object. def delete(key, &block) convert_value_to_parameters(@parameters.delete(key, &block)) end |