Method: ActionController::Parameters#transform_keys

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

#transform_keys(&block) ⇒ Object

Returns a new ActionController::Parameters instance with the results of running block once for every key. The values are unchanged.



906
907
908
909
910
911
# File 'lib/action_controller/metal/strong_parameters.rb', line 906

def transform_keys(&block)
  return to_enum(:transform_keys) unless block_given?
  new_instance_with_inherited_permitted_status(
    @parameters.transform_keys(&block)
  )
end