mattgreen/nitron — pull request #14 by macfanatic (2012-06-26 15:06:00+00:00)
Title: Fix for compound predicates being overwritten

Following code lost the first `where()` statement, as compound predicate was only being created with one subpredicate, instead of 2.

```ruby
scope = Consignor.order(:created_at)
scope.where("status = ?", :scheduled) unless ignore_scheduling_info?
scope.where("first_name contains[cd] ?", "matt")

# Inspect the predicates
predicate_types = %w(NOT AND OR)
puts "predicate(#{predicate_types[scope.predicate.compoundPredicateType]}): #{scope.predicate.subpredicates.collect(&:description)}"
```