coopdevs/timeoverflow

View on GitHub
app/views/users/_toggle_manager_link.html.erb

Summary

Maintainability
Test Coverage
<%= link_to member.toggle_manager_member_path,
            class: 'action',
            method: :put,
            data: { confirm: t('users.index.manage_warning', username: member.username) } do %>
  <% if member.manager? %>
    <%= glyph :arrow_down %>
    <%= t 'global.demote' %>
  <% else %>
    <%= glyph :arrow_up %>
    <%= t 'global.promote' %>
  <% end %>
<% end %>