method
extract!
v7.1.3.2 -
Show latest stable
- Class:
ActionController::Parameters
extract!(*keys)public
Removes and returns the key/value pairs matching the given keys.
params = ActionController::Parameters.new(a: 1, b: 2, c: 3) params.extract!(:a, :b) # => #<ActionController::Parameters {"a"=>1, "b"=>2} permitted: false> params # => #<ActionController::Parameters {"c"=>3} permitted: false>