lib/mongoid/tags.rb
##
# Returns a hash representing a Mongoid criteria
# for the given tag query.
#
# @example
#   hash = Document.selector('foo bar')
#   hash # => {"tags"=>{"$in"=>["foo", "bar"]}}
#
# @param [String] query The query you're searching for
#
# @return [Hash] Hash which can be used as a Mongoid criteria
Returns a hash representing a Mongoid criteria
for the given tag query.
Returns a hash representing a Mongoid criteria for the given tag query .
def selector(query)
        parsed_query = parser.parse(query)
        raise Mongoid::Tags::Error, parser.failure_reason unless parsed_query
        parsed_query.to_criteria
      end
def selector ( query ) parsed_query = parser . parse ( query ) raise Mongoid :: Tags :: Error , parser . failure_reason unless parsed_query parsed_query . to_criteria end
Returns a hash representing a Mongoid criteria
for the given tag query.
Returns a hash representing a Mongoid criteria for the given tag query .
Hash which can be used as a Mongoid criteria
Hash which can be used as a Mongoid criteria
Hash
query
<not_specific>
<not_specific>
query The query you're searching for
query The query you ' re searching for
example
None