Since the tasks can indirectly belong to many users at once I couldn't
simply add a completed boolean to that class. ("Run a mile under 6
minutes" might be completed by Jeremy but not yet by Alex).
I ended up adding this method to my user model:
def completed_tasks_in_current_award
tasks =
completed_tasks.each do |ct|
if ct.task.task_group.award == award
tasks << ct.task
end
end
tasks
end
I'm guessing there might be a way to do it with more code - but this
will suffice for now.