Class: ActsAsTaggableOn::Taggable::TaggedWithQuery::AllTagsQuery

Inherits:
QueryBase
  • Object
show all
Defined in:
lib/acts_as_taggable_on/taggable/tagged_with_query/all_tags_query.rb

Instance Method Summary collapse

Methods inherited from QueryBase

#initialize

Constructor Details

This class inherits a constructor from ActsAsTaggableOn::Taggable::TaggedWithQuery::QueryBase

Instance Method Details

#buildObject


3
4
5
6
7
8
9
# File 'lib/acts_as_taggable_on/taggable/tagged_with_query/all_tags_query.rb', line 3

def build
  taggable_model.joins(each_tag_in_list)
                .group(by_taggable)
                .having(tags_that_matches_count)
                .order(order_conditions)
                .readonly(false)
end