public
Created

devise

  • Download Gist
_admin_menu.html.erb
HTML+ERB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<!--
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>
application.html.erb
HTML+ERB
1 2 3 4 5 6 7 8 9 10 11 12
<!--
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>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.