Search⌘ K
AI Features

Using a Custom Controller

Understand how to create a custom controller in Rails 6, connect URLs to controller actions, and display dynamic content using views. This lesson guides you through adding basic HTML to template files and organizing your application within the Rails directory structure.

We'll cover the following...

At this point, we can see not only that we’ve connected the URL to our controller, but also that Rails is pointing the way to our next step. Namely, we have to tell Rails what to display. This is where views come in. Remember when we ran the script to create the new controller? That command added ...