app/views/invitations/index.html.slim

Summary

Maintainability
Test Coverage
h2 = t('labels.invitations')
table.table.table-striped.table-bordered
  thead
    tr
      th Email
      th Reason
      th Invited At
      th Upgrade?
      th
  tbody
    - @users.each do |user|
      tr
        td = user.email
        td = user.invite_reason
        td = user.invitation_sent_at.try(:to_s, :db)
        td = :Yes if user.login
        td
          - if user.invited_by_id?
            | Invited!
          - else
            = link_to t('labels.invite_button'), (user.login ? upgrade_invite_invitation_path(user) : mail_invitation_path(user)), :method => :patch