From the course: Ruby on Rails 6 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Render a view template for a browser

Render a view template for a browser - Ruby on Rails Tutorial

From the course: Ruby on Rails 6 Essential Training

Start my 1-month free trial

Render a view template for a browser

- [Narrator] In this chapter, we're going to examine how the controllers and views work, and how they allow us to output dynamic content. We're going to begin by learning how templates are rendered. We've already seen the MVC Web Architecture diagram a couple of times. And in the last chapter we talked about the fact that the model and the database are really optional. The parts that are essential to every request and response is that the browser has to send a request to the controller, the controller then chooses a view template to send back to the browser. This triangle is what we're going to be focused on in this chapter. The three essential parts to this request-response loop. The first is that we need to have a route. That route determines how a URL is sent to the correct controller and action. Then we want to have a controller action that will perform whatever code we want to use as a response to it. And then…

Contents