Home > Development, Tech Notes > [Tech Note] How Does Rails Processes An Incoming Request?

[Tech Note] How Does Rails Processes An Incoming Request?

In a Rails application, incoming requests are processed as follows:

  1. Incoming request is sent to a router.
  2. The request is divided into parts by the router (parsed) to identify a particular method (action) somewhere in the controller code.
    1. The router takes the first part as a controller name
    2. The router takes the second part as a method name (action).
  3. The action might look at data in the request itself or interact with the model or may invoke another action. Eventually, the action prepares information for the view.
  4. the view renders something to the user.
Categories: Development, Tech Notes
  1. No comments yet.
  1. No trackbacks yet.