Method: ActionController::Parameters#delete
- Defined in:
- actionpack/lib/action_controller/metal/strong_parameters.rb
#delete(key, &block) ⇒ Object
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). This method is similar to #extract!, which returns the corresponding ActionController::Parameters object.
942 943 944 |
# File 'actionpack/lib/action_controller/metal/strong_parameters.rb', line 942 def delete(key, &block) convert_value_to_parameters(@parameters.delete(key, &block)) end |