Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Rails 8 Course - Beginner to Intermediate!
You have completed Rails 8 Course - Beginner to Intermediate!
Preview
This video covers how to create a new page in a Rails application, set up routing, configure controllers and views, and establish navigation links between pages.
Resources
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
I want to give you a better understanding
by creating a new page on the application.
0:00
The application is gonna
have a page called homepage.
0:00
So let's go ahead and do that.
0:02
We're gonna go to the terminal, right?
0:04
So go to the terminal, hit clear.
0:06
And inside of here, what we're gonna do
is we're gonna say, rails g controller,
0:07
we will call it pages, and we'll just
have one page called home for now.
0:12
You could also add like an about page,
contact page, pricing page, whatever.
0:16
So I'm just doing this for the purpose of
showing you, hit Enter on that command,
0:20
and that's going to create a new
controller, a new folder, and a root.
0:24
So look, if we go to post controller,
I mean, pages_controller,
0:27
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up