Skip to content

Instantly share code, notes, and snippets.

@oma
Created January 29, 2012 14:12
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 oma/1698995 to your computer and use it in GitHub Desktop.
Save oma/1698995 to your computer and use it in GitHub Desktop.
devise
<!--
Used for https://github.com/rubykurs/bootstrap
branch auth
@Gemfile
gem 'devise'
$ rails g devise:install
$ rails g devise admin
$ rake db:migrate
-->
<ul class="nav secondary-nav">
<% if admin_signed_in? %>
<li><%= link_to "Sign out", destroy_admin_session_path, :method => :delete %> </li>
<% else %>
<li><%= link_to "Admin", new_admin_session_path %></li>
<% end %>
</ul>
<!--
or common/_header.html.erb if body header is extracted there.
-->
<div class="topbar">
<div class="fill">
<div class="container">
...
<%= render :partial => 'common/admin_menu' %>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment