module Mongoid::TaggableWithContext::AggregationStrategy::RealTimeGroupBy::ClassMethods
Public Instance Methods
tag_name_attribute()
click to toggle source
# File lib/mongoid/taggable_with_context/aggregation_strategy/real_time_group_by.rb, line 7 def tag_name_attribute "_name" end
Protected Instance Methods
query(context, group_by)
click to toggle source
# File lib/mongoid/taggable_with_context/aggregation_strategy/real_time_group_by.rb, line 36 def query(context, group_by) aggregation_database_collection_for(context).find({value: {"$gt" => 0 }, group_by: group_by}).sort(tag_name_attribute.to_sym => 1) end