Skip to content

Instantly share code, notes, and snippets.

@jameshibbard
Created January 18, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jameshibbard/8012f7c343a792daac27 to your computer and use it in GitHub Desktop.
Save jameshibbard/8012f7c343a792daac27 to your computer and use it in GitHub Desktop.
Devise / cancancan tutorial: changes to the application template
<% if user_signed_in? %>
Signed in as <%= current_user.email %>. Not you?
<%= link_to "Edit profile", edit_user_registration_path %>
<%= link_to "Sign out", destroy_user_session_path, :method => :delete %>
<% else %>
<%= link_to "Sign up", new_user_registration_path %> or <%= link_to "sign in", new_user_session_path %>
<% end %>
<% flash.each do |name, msg| %>
<%= content_tag :div, msg, id: "flash_#{name}" %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment