lib/mongoid/report/scope.rb in mongoid-report-0.0.7 vs lib/mongoid/report/scope.rb in mongoid-report-0.0.8

- old
+ new

@@ -1,10 +1,10 @@ module Mongoid module Report Scope = Struct.new(:context, :report_name) do - def query(conditions) - queries.concat([conditions]) + def query(conditions = {}) + queries.concat([conditions]) unless conditions.empty? self end # We need to add grouping conditions when user needs it. def yield