Skip to content
Browse files

change group_by to group_by_field

  • Loading branch information...
1 parent 16a24c0 commit 734d45675c869beb0f31a34b20da1fa975d92c2b @s12chung committed Aug 31, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/mongoid/taggable_with_context/group_by/aggregation_strategy/real_time.rb
View
4 lib/mongoid/taggable_with_context/group_by/aggregation_strategy/real_time.rb
@@ -35,7 +35,7 @@ def tags_with_weight_for(context, group_by, conditions={})
protected
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)
+ aggregation_database_collection_for(context).find({:value => {"$gt" => 0 }, :group_by_field => group_by}).sort(tag_name_attribute.to_sym => 1)
end
end
@@ -45,7 +45,7 @@ def get_conditions(context, tag)
conditions = {self.class.tag_name_attribute.to_sym => tag}
group_by_field = self.class.get_tag_group_by_field_for(context)
if group_by_field
- conditions.merge!({:group_by => self.send(group_by_field)})
+ conditions.merge!({:group_by_field => self.send(group_by_field)})
end
conditions
end

0 comments on commit 734d456

Please sign in to comment.
Something went wrong with that request. Please try again.