<!DOCTYPE html>
<html>
<head>
  <title>DudeOverflow</title>
  <%= stylesheet_link_tag    'application', media: 'all' %>
  <%= javascript_include_tag 'application' %>
  <%= csrf_meta_tags %>
</head>
<body>
  <% if flash[:notice] %>
    <%= flash[:notice] %>
  <% end %>

<%= yield %>

</body>
</html>

<!DOCTYPE html>
<html>
<head>
  <title>DudeOverflow</title>
  <%= stylesheet_link_tag    'application', media: 'all' %>
  <%= javascript_include_tag 'application' %>
  <%= csrf_meta_tags %>
</head>
<body>
  <% if flash[:notice] %>
    <%= flash[:notice] %>
  <% end %>
  <% if logged_in? %>
    <p> Logged in as: <%= link_to current_user.username, current_user %> </p>
    <%= link_to 'Logout', logout_path, method: 'delete' %>
  <% end %>

<%= yield %>

</body>
</html>

Add logout link if user is logged in
Add logout link if user is logged in
