The construct "where.not" doesn't respect boolean algebra · Issue #31209 · rails/rails
Steps to reproduce When two predicates A and B are given to a where clause, Rails combines them using AND, which is the expected behavior. Model.where(col1: 1, col2: 2).to_sql # => SELECT "models"....