Locked lesson.
About this lesson
What is the Application.html file and what is it used for?
Exercise files
Download this lesson’s related exercise files.
Understanding the Application.html File.docx58.8 KB Understanding the Application.html File - Solution.docx
58.8 KB
Quick reference
Understanding the Application.html File
In this video, we'll discuss the Application.html.erb file and why it is important.
When to use
Any time you'd like to add something to every single page of your app, you can place it in the Application.html.erb file and it will appear on every page of your app.
Instructions
The application.html.erb file is the central hub of all your web pages. It is the main template that all pages will use.
Whenever you add something to that file, it will appear on all the pages of your site.
This makes it a great place to put your site's navigation, because if you make a change to your navigation in the future, that change will appear instantly on all the pages of your site, without you needing to manually update all the pages.
Hints & tips
- Application.html.erb is located in the app/views/layouts directory
- Anything you add to Application.html.erb will show up on all pages of your site
- It's a great place to put your site's navigation
Lesson notes are only available for subscribers.