afimb/chouette2

View on GitHub
app/views/devise/shared/links.erb

Summary

Maintainability
Test Coverage
<% content_for :sidebar do %>
<ul class="actions">

  <%- if controller_name != 'sessions' %>
  <li>
    <%= link_to t('devise.sessions.actions.new'), new_session_path(resource_name) %>
  </li>
  <% end -%>

  <li>
    <%= link_to t('subscriptions.actions.new'), new_subscription_path %>
  </li>

  <%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
  <li>
    <%= link_to t('devise.passwords.actions.new'), new_password_path(resource_name) %>
  </li>
  <% end -%>

  <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
  <li>
    <%= link_to t('devise.confirmations.actions.new'), new_confirmation_path(resource_name) %>
  </li>
  <% end -%>

  <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
  <li>
    <%= link_to t('devise.unlocks.actions.new'), new_unlock_path(resource_name) %>
  </li>
  <% end -%>
</ul>
<% end %>