Skip to content
rutipo edited this page Feb 1, 2012 · 9 revisions
  1. Run a test rake spec

    • create a new directory "menu" under "views/devise/menu/"
  • create a new file, call it: "views/devise/menu/_login_items.html.erb"

file content:
<% if user_signed_in? %>

  • <%= link_to('Logout', destroy_user_session_path, :method => :delete) %>
  • <% else %>
  • <%= link_to('Login', new_user_session_path) %>
  • <% end %>

    as described in: https://github.com/plataformatec/devise/wiki/How-To:-Add-sign_in,-sign_out,-and-sign_up-links-to-your-layout-template

    1. Add to the file: views/layout/application.html.erb the following content: Add it inside the body tag, right at the top of the tag: <%= render :partial => 'devise/menu/login_items' %>

    2. Run another test rake spec

    Clone this wiki locally