lib/mongodoc/criteria.rb in mongodoc-0.1.1 vs lib/mongodoc/criteria.rb in mongodoc-0.1.2

- old
+ new

@@ -455,10 +455,10 @@ # and pass them on to the Ruby driver's +find()+ method on the collection. The # collection itself will be retrieved from the class provided. # # Returns either a cursor or an empty array. def execute - cursor = @klass.collection.find(selector, options.dup) + cursor = klass.collection.find(selector, options.dup) if cursor @count = cursor.count cursor else []