Permalink
Browse files

Sign in and out links

  • Loading branch information...
halogenandtoast committed Apr 2, 2012
1 parent f7d10ba commit 2c56749eb0617afdc5595290b4feca180a02a807
Showing with 7 additions and 2 deletions.
  1. +0 −2 app/views/dashboards/show.html.erb
  2. +6 −0 app/views/layouts/application.html.erb
  3. +1 −0 app/views/users/show.html.erb
@@ -1,5 +1,3 @@
-Welcome <%= current_user.email %>
-
<%= form_for(@shout) do |form| %>
<%= form.text_field :body, placeholder: "Shout here" %>
<%= form.submit "Shout!" %>
@@ -7,6 +7,12 @@
<%= csrf_meta_tags %>
</head>
<body>
+ <% if signed_in? %>
+ Welcome <%= current_user.email %>
+ <%= link_to "Sign out", sign_out_path, method: :delete %>
+ <% else %>
+ <%= link_to "Sign in", sign_in_path %>
+ <% end %>
<% flash.each do |key, value| -%>
<div class="flash <%= key %>"><%= value %></div>
@@ -1,2 +1,3 @@
<h1><%= @user.email %></h1>
+<%= button_to "Follow", root_path %>
<%= render @shouts %>

0 comments on commit 2c56749

Please sign in to comment.