Method: Contentstack::Query#not_equal_to

Defined in:
lib/contentstack/query.rb

#not_equal_to(field_uid, value) ⇒ Contentstack::Query

Add a constraint to the query that requires a particular key’s entry to be not equal to the provided value.

Example

@query = @stack.content_type('product').query
@query.not_equal_to('price', '100')

Parameters:

  • field_uid (String)

    UID of the field for which query should be executed

  • value (String)

    The object that must not be equaled.

Returns:

[View source]

242
243
244
245
# File 'lib/contentstack/query.rb', line 242

def not_equal_to(field_uid, value)
  add_query_hash({:"#{field_uid}" => {"$ne" => value}})
  self
end