EagerELK/ditty

View on GitHub
views/users/login_traits.haml

Summary

Maintainability
Test Coverage
.row
  .col-md-12
    .card.card-default.shadow
      .card-body
        %h4.card-title Logins
      %table.table.table-striped.mb-0
        %thead.thead-dark
          %tr
            %th IP Address
            %th Device
            %th Platform
            %th Browser
            %th Last Seen
        %tbody
          - if user_login_traits.count.positive?
            - user_login_traits.each do |trait|
              %tr
                %td= trait.ip_address
                %td= trait.device
                %td= trait.platform
                %td= trait.browser
                %td= trait.updated_at.strftime('%F %T')
          - else
            %tr
              %td.text-center{ colspan: 5 } No Records