If I know the current_user
's answers because the User
model has an answers
collection:
current_user.answers
How do I test whether that answers
collection contains the current answer (referenced by the @answer
class variable) at each step of a loop?
I was tempted to use the include? method:
current_user.answers.include?(@answer)
but I see it's for mixins :(