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
George Drakoglou
7,969 PointsNavigating links.
I am doing the lesson about the navigating links and I've stuck a little bit with the de;ete method. Here is my code.
<li><%= link_to current_user.full_name, edit_user_registration_path %></li>
<li><%= link_to "Log Out", destroy_user_session_path, method: :delete %></li>
according to the lesson, it should print an error, that it can't displey the current user. Instead it prints
No route matches [GET] "/users/sign_out"
which shouldn't be.
In addition if I try to skip this and go on adding the code
<% if user_signed_in? %>
<% end %>
Above and below, nothing changes.
George Drakoglou
7,969 PointsUnfortunately because I didn't have any particular problem anderstanding Ruby,or on the tests I moved on wtih the lectures. But now it is all mest up. So I will start the project again. I hope when I get to the same point I won't have the say problem. Thank you very much for the help! When I get there again I'll let you know!
David Zhang
12,363 PointsDavid Zhang
12,363 PointsHow does your routes.rb looks like?
Personally, here is my routes for authentications: resources :authentications
And in my navigation: <li><%= link_to "Log out", logout_path %></li>
Hope it'll help