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
2008/1/22, sayoyo Sayoyo [email protected]:
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?
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.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs