Answering my own question:
There is a method ActionDispatch::Request#query_parameters
. It returns only the parameters set via query string.
There are also method path_parameters
and symbolized_path_parameters
. It is obvious they return parameters derived from path (including controller
and action
). They can be called on request
inside a controller action. (They are not documented under ActionDispatch::Request
, this is why I missed them initially.)
Rails 5 (edit Jan 9, 2017): As of Rails 5 method symbolized_path_parameters
was removed. Method path_parameters
is now documented.