Skip to content

Instantly share code, notes, and snippets.

@kossnocorp
Created November 26, 2009 07:40
Show Gist options
  • Select an option

  • Save kossnocorp/243309 to your computer and use it in GitHub Desktop.

Select an option

Save kossnocorp/243309 to your computer and use it in GitHub Desktop.
<ul>
<% if current_user %>
<li><%= link_to_unless_current 'Login', login_path %></li>
<li><%= link_to_unless_current 'Registration', registration_path %></li>
<% else %>
<li><%= link_to_unless_current 'Profile', profile_path %></li>
<li><%= link_to_unless_current 'Settings', settings_path %></li>
<li><%= link_to_unless_current 'Logout', logout_path %></li>
<% end %>
</ul>
%ul
- if current_user
%li= link_to_unless_current 'Login', login_path
%li= link_to_unless_current 'Registration', registration_path
- else
%li= link_to_unless_current 'Profile', profile_path
%li= link_to_unless_current 'Settings', settings_path
%li= link_to_unless_current 'Logout', logout_path
- links_list do
- if current_user
- li :login_path => 'Login', :registration_path => 'Registration'
- else
- li :profile_path => 'Profile', :settings_path => 'Settings'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment