class ActsAsTaggableOnMongoid::Taggable::TaggedWithQuery::AllTagsQuery

A class finding all Taggable objects which include all of the passed in tags (may include other tags as well).

Public Instance Methods

build() click to toggle source
# File lib/acts_as_taggable_on_mongoid/taggable/tagged_with_query/all_tags_query.rb, line 8
def build
  { :id.in => included_ids }
end
included_ids() click to toggle source
# File lib/acts_as_taggable_on_mongoid/taggable/tagged_with_query/all_tags_query.rb, line 12
def included_ids
  selector         = Mongoid::Criteria::Queryable::Selector.new
  selector[:count] = tag_list.count

  build_ids_from(selector)
end