back

by pwim·14y ago·view on hn ↗
student.tests.inject(false) {|acc, test| acc || (!test.taken? )}

can be reduced even further using the all? method

!student.tests.all?(&:taken?)