vol1ura/Sat_9am_5km

View on GitHub
app/views/admin/results/down.js.erb

Summary

Maintainability
Test Coverage
$row1 = document.getElementById('<%= dom_id resource %>');
$row2 = document.getElementById('<%= dom_id @next_result %>');

athlete1 = $row1.querySelector('.col-athlete').innerHTML;
athlete2 = $row2.querySelector('.col-athlete').innerHTML;

$row1.querySelector('.col-athlete').innerHTML = athlete2;
$row2.querySelector('.col-athlete').innerHTML = athlete1;