module ActionDispatch::Http::Parameters

def path_parameters

{ action: "my_action", controller: "my_controller" }

Returned hash keys are strings:
Returns a hash with the \parameters used to form the \path of the request.
def path_parameters
  get_header(PARAMETERS_KEY) || set_header(PARAMETERS_KEY, {})
end