Arie/serveme

View on GitHub
app/views/servers/_server_info.html.haml

Summary

Maintainability
Test Coverage
- reservation = server.current_reservation
- statistic = server.recent_server_statistics.last&.decorate
%tr
  %td
    = server.name.html_safe

  - if statistic
    %td= statistic.map_name
    %td= statistic.number_of_players
    %td= statistic.fps
    %td.actions
      = "#{server.inactive_minutes} minutes"
  - else
    - if reservation
      %td{colspan: 3} N/A
      %td.actions
    - else
      %td{colspan: 4} Idle