For ActiveRecord 4.2 change class ActiveRecord::PredicateBuilder::ArrayHandler instead of changing the class ActiveRecord::PredicateBuilder.