Displaying 1 result from an estimated 1 matches for "missed_stud".
2007 Aug 09
2
trying to find records that haven't been updated in 2 weeks
My app has some students that have attendances. I''m trying to find
students who have not attended class in the last 2 weeks. Here is my
code that is not working:
students = @school.students.active
@missed_attnd = []
students.each do |student|
unless student.attendances.empty?
@missed_attnd << student if student.attendances.first.date <=
Date.today - 2.weeks
end
end
An