as the title suggests I am trying to query my model. I am trying to query it based of two conditions. I came across this question, though similar it doesn't quite answer my question.
I have tried the following method but it only works if the lists are populated.
school.classes.where.not('"classes"."highest_achiever_id" NOT IN (?) OR "classes"."room_id"' NOT IN (?), [1,2,3,4], [1,2,3,4])
The above query is what I am using to retrieve all classes that meet my conditions, my only problem is the case where the list being passed is empty this query seems to return empty results.