Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Rails Routes and Resources A Route to a Read Action Linking to Model Objects

Embed a link in this template's output using the link_to method. The link text should say "List of all Pets", and the li

Embed a link in this template's output using the link_to method. The link text should say "List of all Pets", and the link path should be "/pets".

app/views/main.html.erb

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

Alejandro, did you watch the videos carefully? Please paste some code that you tried that didn't work - this will tell us that you've put some effort into the task and what your problem is exactly.

Caitlin Palmer-Bright
Caitlin Palmer-Bright
11,310 Points

I thought I was struggling with this about 20 minutes ago, before realising I'd just added an extra comma! But the example in the video is very close - see what they type in each section of the ERB vs what appears on the page when it loads

1 Answer

mahdi mostafa
mahdi mostafa
9,750 Points

This is what it is asking you to write for anyone in the future who comes across to this page: <p><%= link_to "List of all Pets", "/pets" %></p>