module Mongoid::TaggableWithContext::AggregationStrategy::MapReduce::ClassMethods
Public Instance Methods
aggregation_collection_for(context)
click to toggle source
# File lib/mongoid/taggable_with_context/aggregation_strategy/map_reduce.rb, line 17 def aggregation_collection_for(context) "#{collection_name}_#{context}_aggregation" end
aggregation_database_collection_for(context)
click to toggle source
Collection name for storing results of tag count aggregation
# File lib/mongoid/taggable_with_context/aggregation_strategy/map_reduce.rb, line 13 def aggregation_database_collection_for(context) (@aggregation_database_collection ||= {})[context] ||= Mongo::Collection.new(self.collection.database, aggregation_collection_for(context)) end