lib/mongoid/report/output.rb in mongoid-report-0.2.1 vs lib/mongoid/report/output.rb in mongoid-report-0.2.2

- old
+ new

@@ -4,9 +4,12 @@ class Output attr_accessor :collection_name, :options def do(rows) drop() + + return if rows.empty? + collection.insert(rows) end def present? collection_name.present?