Skip to content

Commit 15d2658

Browse files
author
alex
committed
feat: add user navigation bar
1 parent dd0fcd4 commit 15d2658

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<div class="user_navigation">
2+
<% if !current_user %>
3+
<%= link_to 'Sign in', new_user_session_path %>
4+
<%= link_to 'Sign up', new_user_registration_path %>
5+
<% else %>
6+
Hi! <%= current_user.email %>
7+
<%= link_to 'Sign out', destroy_user_session_path, :method => :delete %>
8+
<% end %>
9+
</div>

app/views/layouts/application.html.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
</head>
1010

1111
<body>
12+
<%= render 'common/user_nav' %>
1213
<!--<p class="notice"><%= notice %></p>-->
1314
<p class="alert"><%= alert %></p >
1415
<%= yield %>

0 commit comments

Comments
 (0)