3 ms·
student.tests.inject(false) {|acc, test| acc || (!test.taken? )} can be reduced even further using the all? method !student.tests.all?(&:taken?)
by pwim 14y ago
student.tests.inject(false) {|acc, test| acc || (!test.taken? )}
can be reduced even further using the all? method
!student.tests.all?(&:taken?)