Locked lesson.
About this lesson
Building out additional web pages manually (controllers, routes, and views).
Exercise files
Download this lesson’s related exercise files.
Adding Additional Web Pages.docx58.8 KB Adding Additional Web Pages - Solution.docx
59.1 KB
Quick reference
Adding Additional Web Pages
In this video we'll manually add an additional web page to our app.
When to use
Whenever you want to add a new web page to your app, you can do it manually fairly easily.
Instructions
To manually add a web page to your app, follow these three steps.
1. Add a new HTML file in your View directory. Be sure to name it with a .html.erb file extension.
2. Add a reference to that file in your home controller.
3. Add a new route to that file in your routes.rb file.
Hints & tips
- Adding web pages manually is pretty easy
- Add the html file, then add a reference to the controller, then add a new route in the routes.rb file
- Don't forget to name the HTML file with a .html.erb file extension
Lesson notes are only available for subscribers.