1
0
Fork 0

Add sign in logic to link display in layout (needs helper)

This commit is contained in:
Andrew Tomaka 2013-04-06 01:44:59 -04:00
parent 586e797047
commit dd5c725715

View file

@ -44,14 +44,20 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="#">MsuCourseAlerter</a>
<a class="brand" href="/">MsuCourseAlerter</a>
<div class="container-fluid nav-collapse">
<ul class="nav">
<% if user_signed_in? %>
<li><%= link_to "Alerts", alerts_path %></li>
<li><%= link_to "Sign in", new_user_session_path,
:method => :get %></li>
<li><%= link_to "Sign out", destroy_user_session_path,
:method => :delete %></li>
<% else %>
<li><%= link_to "Sign in", new_user_session_path,
:method => :get %></li>
<li><%= link_to "Register", new_user_registration_path,
:method => :get %></li>
<% end %>
</ul>
</div><!--/.nav-collapse -->
</div>