Skip to content

Commit

Permalink
Added sign-in and sign-out elements to the navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
sdflem committed Nov 2, 2018
1 parent 1dce477 commit 88f4f42
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,13 @@
=end
%>
</ul>
<%
=begin
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>
=end
%>

<% if user_signed_in? %>
<span class="navbar-text" style="margin-right: 1rem"><%= current_user.email %></span>
<%= link_to 'Sign Out', destroy_user_session_path, method: :delete, class: 'btn btn-outline-primary' %>
<% else %>
<%= link_to 'Sign In', new_user_session_path, class: 'btn btn-outline-primary' %>
<% end %>
</div>
</nav>

Expand Down

0 comments on commit 88f4f42

Please sign in to comment.