Method: ActionController::Parameters#extract!

Defined in:
actionpack/lib/action_controller/metal/strong_parameters.rb

#extract!(*keys) ⇒ Object

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>


752
753
754
# File 'actionpack/lib/action_controller/metal/strong_parameters.rb', line 752

def extract!(*keys)
  new_instance_with_inherited_permitted_status(@parameters.extract!(*keys))
end