This course will be retired on June 1, 2025.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
- The Root Path 2:39
- Root Path 2 objectives
- Getting HTML from a Template 2:19
- Loading ERB Templates 1 objective
- Loading Text Files 2:43
- URL Parameters 4:19
- URL Parameters 1 objective
- ERB Tags 7:15
- ERB Tags 1 objective
- Embedding Page Data with ERB 4:22
- Embedding Instance Variables 3 objectives
- ERB 5 questions

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
We want to be able to type in "/Nick Pettit" or "/Robots" or any other page we've created a text file for, and have it load. But there's no way we can create separate Sinatra routes for all those. Not only would our app code be really long, we can't possibly anticipate every page that users might want to create. So instead, we're going to create a single route that will match any page users might attempt to visit. And we'll do it using a "URL parameter".
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
David Greenstein
6,734 Points1 Answer
-
tarioug MA
4,489 PointsWhy get("/:title") did store the title of the page in the symbol title ?
Posted by tarioug MAtarioug MA
4,489 Points3 Answers
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
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