From d75d9da1746b1a5cda581b7c86d1bcb2bc565c27 Mon Sep 17 00:00:00 2001 From: Ryan Lue Date: Thu, 20 Jul 2017 16:58:30 +0800 Subject: Correct API documentation for ActionController::Parameters#delete --- actionpack/lib/action_controller/metal/strong_parameters.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'actionpack/lib/action_controller') 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 -- cgit v1.2.3