summaryrefslogtreecommitdiff
path: root/app/views/layouts
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-03-04 10:57:54 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-03-04 10:57:54 -0500
commit1d90f33bf07f9610d358c6c9c56754784b050541 (patch)
tree4d7385e543e0ed77d43a7ed8fd4045087f17848a /app/views/layouts
parent42cf035f9023e773a20d2b14a984ba0a5fef9c60 (diff)
simplify the sessions routing
Diffstat (limited to 'app/views/layouts')
-rw-r--r--app/views/layouts/application.html.erb17
1 files changed, 9 insertions, 8 deletions
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index b36c0c5..f12c778 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -19,14 +19,15 @@
<%= submit_tag("Go", {:class => "btn btn-warning"}) %>
<% end %>
</div>
- <% if signed_in? %>
- <li> <%= current_user.user_name.upcase %> </li>
- <% end %>
- <li>
- <%= if signed_in? do %>
- <%= link_to "Sign out", signout_path, method: "delete" %>
- <% end; end %>
- </li>
+ <ul>
+ <% if signed_in? %>
+ <li><%= current_user.user_name.upcase %></li>
+ <li><%= link_to "Sign out", session_path("current"), method: "delete" %></li>
+ <% else %>
+ <li><%= link_to "Log in", new_session_path %></li>
+ <li><%= link_to "Sign up", new_user_path %></li>
+ <% end %>
+ </ul>
</header>
</div>