Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
We've set up a route so that the user's browser request makes it to the index action method on the PagesController. But the controller is attempting to render a view, and we haven't created one. So the request is failing. Let's create one now.
When looking for an ERB template so it can render an HTML response, Rails will look for a template file in this location:
app/views/<controller>/<action>.html.erb
...Where <controller>
is the name of the current controller (with the word Controller
left off), and <action>
is the name of the current action method.
You can read more in the official Rails documentation.
You need to sign up for Treehouse in order to download course files.
Sign up