Hi,
Does anyone know when exactly the "controller" objects are created in rails? when the http server starts? or when it is answering a http request? or ... thanks you very much.
Sayoyo
Hi,
Does anyone know when exactly the "controller" objects are created in rails? when the http server starts? or when it is answering a http request? or ... thanks you very much.
Sayoyo
The dispatcher will handle each request and a new controller is instantiated by the routing system when a route is recognized.
In ActionController::Dispatcher, you've got this method :
def handle_request @controller = Routing::Routes.recognize(@request) @controller.process(@request, @response).out(@output) end
-- Jean-François.