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
Casey Clayton
16,708 PointsCreating the Friendship Form
when I go to create the link on my show.html.erb page so we can debug the error I am getting an undefined method new_user_friendship_path error when I refresh the page. Any ideas? Code I have.
<%= link_to "Add Friend", new_user_friendship_path(friend_id: @user) %>
2 Answers
Brandon Barrette
20,485 PointsAre you sure it's defined in your routes.rb file? That's where I would look first. The link doesn't know where "new_user_friendship_path" is supposed to go.
Casey Clayton
16,708 PointsOk it was as simple as me missing an s on resources in the routes file. Problem Solved
Casey Clayton
16,708 PointsCasey Clayton
16,708 PointsWell the only thing the video had me update in the routes was add as: 'profile' to the following to look like this
get '/:id', to: 'profiles#show', as: 'profile'Casey Clayton
16,708 PointsCasey Clayton
16,708 PointsI have triple checked the video and it doesn't show anything being added to the routes besides what I did add already.