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

Code challenge: Update this view's link_to to use the newly created named :feed route.

Greetings everyone - I let the above question (& my answer) sit overnight and I can't seem to come up with the correct code.

My answer below follows along exactly how it was developed in the video.

<ul class="nav">
  <li><%= link_to "News Feed", 'feed_path' %></li>
</ul>

Your input is greatly appreciated!

4 Answers

feed_path doesn't need to be a string.
<li><%= link_to "News Feed", feed_path %></li>

--face palm-- Thank you!!

How come this doesn't work?

<li><%= link_to "News Feed", :feed %></li>

You need to use the Path: feed_path

<ul class="nav"> <li><%= link_to "News Feed", feed_path %></li> </ul>