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

Cannot find where this was covered in the Odot videos...

Jason Seifer, I've gone straight through the course (as best as I can tell) but I have found some code that is in your odot app but not in mine. Specifically the tests, application controller updates, and application view updates that provide the logged_in? method, log in and log out links.

Can you point to the video where these are covered? Thanks!

2 Answers

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Hey David Moore which course did you go through? There are many where we go over ODOT.

Sorry, added an answer as opposed to reply.

Don't sweat it Jason, I wanted to make sure I hadn't missed anything else but I think I have everything working. I had some weirdness happen a while back and several videos marked as complete when I hadn't watched them.

As a slightly related suggestion, is it possible to set the videos to only show as completed in the list after they have been fully watched? Nothing major but it would be nice to to help keep things straight for those times when you have to stop mid video.

I noticed they appeared about halfway through Password Resets and Testing of the User Authentication with Rails course. I've completed the Odot courses as they have been released. For simplicity, I'm asking what video implements the logged_in? method in the unordered list in application.html.erb

<div class="nav">
    <h1><%= link_to "Odot", root_path %></h1>
    <ul>
      <li><%= link_to "Todo Lists", todo_lists_path %></li>
      <% if logged_in? %>
        <li><%= link_to "Log Out", logout_path, method: :delete %></li>
      <% else %>
        <li><%= link_to "Log In", new_user_session_path %></li>
        <li><%= link_to "Sign Up", new_user_path %></li>
      <% end %>
    </ul>
    <br class="clear" />
  </div>