$_SERVER
’REQUEST_URI’
The URI which was given in order to access this page; for instance, ’/index.html’.
PHP:
// print the current request uri <?= $_SERVER['REQUEST_URI']; ?>
# same thing, only in ruby <%= request.request_uri %>
Additionally:
<%= request.path_parameters['controller'] %><br /> <%= request.path_parameters['action'] %>
In the RoR docs, see ActionController::AbstractRequest