lib/mongoid/report.rb in mongoid-report-0.0.8 vs lib/mongoid/report.rb in mongoid-report-0.0.9

- old
+ new

@@ -3,10 +3,11 @@ require_relative 'report/queries_builder' require_relative 'report/attach_proxy' require_relative 'report/collection' require_relative 'report/scope' +require_relative 'report/scope_collection' module Mongoid module Report extend ActiveSupport::Concern @@ -37,9 +38,13 @@ end # We should pass here mongoid document def aggregate_for(report_name) Scope.new(self, report_name) + end + + def aggregate + ScopeCollection.new(self) end end module ClassMethods def attach_to(collection, options = {}, &block)