I have a rails scope statement where I want 2 where clauses. (I will clean up the hardcoding when I've got it working).
This is in my workorder model:
scope :laborok, where("wostatus_id NOT IN (?)", [231, 230, 8466, 8467, 232] ) and where("maxsynch = (?)", "N" )
The logic is if the workorder status (wostatus.id) is not one on the values and the workorder.maxsynch is equal to "N"