Module: MongoTagger::ClassMethods

Defined in:
lib/mongo_tagger.rb

Instance Method Summary collapse

Instance Method Details

#find_tagged_with(list_of_tags) ⇒ Object



10
11
12
13
14
# File 'lib/mongo_tagger.rb', line 10

def find_tagged_with(list_of_tags)
  list_of_tags = list_of_tags.split(",") if list_of_tags.is_a? String
  list_of_tags.each {|t| t.strip!}
  all :conditions => {"tags.name" => {"$in" => list_of_tags}}
end