Loading...
📕
3
How HTTP requests work
in Rails
⬅️
index
📺
Link
to original video by
Go Rails
.
Process overview
⚠️
This is how HTTP requests work without any interaction with the model.
[request]
➡️
routes.rb
➡️
[controller]
+
[action]
➡️
view
➡️
browser
A browser sends an HTTP
[request]
(e.g.
/about)
The Rails server receives the request
routes.rb
tells Rails which
[controller]
+
[action]
to send the request to
(e.g.
about#index)
The
[controller]
receives the request and runs code in the method that matches the
[action]
from
routes.rb
Rails generates a
view
(e.g.
index.html.erb)
Rails sends the view back to the
browser
The
browser
renders the view
Example HTTP request and response
⚠️
A model is included in later guides.
🔗
Link
to REST tutorial via Thoughtbot
⬅️
index
Please turn on JavaScript to use Paper in all of its awesomeness. ^_^
Process overview