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.
Generate a controller and view - Ruby on Rails Tutorial
From the course: Ruby on Rails 6 Essential Training
Generate a controller and view
- [Instructor] We will begin customizing our Rails application by learning how to generate a controller and a view. Remember the MVC diagram that we saw earlier? The browser contacts the controller. The controller makes choices and decides how to proceed. It may contact the model, which may be attached to a database, to retrieve data. And once it's assembled everything it needs, then it's going to go to the view to render a template to return back to the browser. I want you to notice that the right part of that diagram, the model and the database, is optional. Some requests may not use them. The browser can contact the controller which then can immediately render a view back to the browser. That left hand triangle though, is essential. It must happen with each request. That's where we're going to focus for now. And we'll learn to work with models later. Let's see how we can create the controller and view. We're going to…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Create a new Ruby on Rails project3m 56s
-
Examine the file structure of a Ruby on Rails project4m 55s
-
(Locked)
Configure a Ruby on Rails project7m 2s
-
(Locked)
Access a Ruby on Rails project from a browser2m 25s
-
(Locked)
Generate a controller and view5m 24s
-
(Locked)
Examine how server requests are handled5m 43s
-
(Locked)
Define routes in a Ruby on Rails project7m 17s
-
(Locked)
Challenge: Experiment1m 15s
-
(Locked)
-
-
-
-
-
-