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 Introduction to Ruby on Rails 7!
You have completed Introduction to Ruby on Rails 7!
Preview
Make your URLs more user-friendly and memorable by implementing the FriendlyID gem. Swap out numeric IDs for human-readable slugs, improving both SEO and user experience.
This video doesn't have any notes.
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
All right, so when we create a tree or a
Linktree, let's enter my name, then click
0:00
Next, then add my Instagram and then click
this style, we're gonna say Dark Mode.
0:00
As you can see in the URL, it gives
us the number that we just created,
0:05
it gives us a number.
0:08
Now, this is really bad for many reasons.
0:09
First of all, anybody can see what
number of trees we have in our database.
0:12
That can be bad for security reasons.
0:17
Second of all, because anybody can see
how many we have, that's just bad.
0:19
Say they know that there's is the tenth
tree, that's not good for the application.
0:23
So, we want to change the URL
to the name of the Linktree.
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