Rails 3 request dispatch cycle

I was looking at the rails 3 architecture in order to understand the
process of dispatching a request . The whole process is quite simple.
Application is a rack application which finally delegates its call
message to the call method of ActionDispatch::Routing::RouteSet which
dispatches appropriate action of necessary controller. It takes
controller and action names from the hash stored in rack env by the
key “action_dispatch.request.path_parameters”.

So the question is: Who sets this hash? Who parses request uri and
determines action and controller names?

I was not able to find this code. I see that during route
configuration ActionDispatch::Routing::Mapper object is used to
construct information about defined routes and stores it in
ActionDispatch::Routing::RouteSet. But how this information is used
during the request to find appropriate action and controller. Is rack
also somehow involved here?

On Dec 11, 5:58pm, mirosm [email protected] wrote:

I was not able to find this code. I see that during route
configuration ActionDispatch::Routing::Mapper object is used to
construct information about defined routes and stores it in
ActionDispatch::Routing::RouteSet. But how this information is used
during the request to find appropriate action and controller. Is rack
also somehow involved here?

Look like it happens via rack-mount these days

Fred