OSDN Git Service

add logout button
authoryasushiito <yas@pen-chan.jp>
Tue, 3 Jan 2012 10:42:26 +0000 (19:42 +0900)
committeryasushiito <yas@pen-chan.jp>
Tue, 3 Jan 2012 10:42:26 +0000 (19:42 +0900)
app/views/layouts/application.html.erb

index 3881256..8522e46 100644 (file)
@@ -17,8 +17,9 @@
 <% end %>
 </div>
 <div>
-<% if author_signed_in? %>
+<% if admin_signed_in? %>
   <%= link_to "system", :controller => '/system' %>
+  <%= link_to "ログアウト", destroy_admin_session_path, :method => :delete %>
 <% else %>
   <%= link_to "管理者", new_admin_session_path %>
 <% end %>