Skip to content

Commit 1dbcd53

Browse files
committed
Merge branch 'array-group-modular-block' into feature/ruby-proxy
2 parents 7c8d367 + e374cdd commit 1dbcd53

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

lib/contentstack/query.rb

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,14 @@ def not_equal_to(field_uid, value)
249249
# @param [String] field_uid UID of the field for which query should be executed
250250
# @param [String] values The possible values for the key's object
251251
#
252-
# Example
252+
# Example 1 - Array Equals Operator Within Group
253253
# @query = @stack.content_type('category').query
254254
# @query.contained_in("title", ["Electronics", "Apparel"])
255255
#
256+
# Example 2 - Array Equals Operator Within Modular Blocks
257+
# @query = @stack.content_type('category').query
258+
# @query.contained_in("additional_info.deals.deal_name", ["Christmas Deal", "Summer Deal"])
259+
#
256260
# @return [Contentstack::Query]
257261
def contained_in(field_uid, values)
258262
add_query_hash({:"#{field_uid}" => {"$in" => values}})
@@ -264,10 +268,14 @@ def contained_in(field_uid, values)
264268
# @param [String] field_uid UID of the field for which query should be executed
265269
# @param [String] values The possible values for the key's object
266270
#
267-
# Example
271+
# Example 1 - Array Not-equals Operator Within Group
268272
# @query = @stack.content_type('category').query
269273
# @query.not_contained_in("title", ["Electronics", "Apparel"])
270274
#
275+
# Example 2 - Array Not-equals Operator Within Modular Blocks
276+
# @query = @stack.content_type('category').query
277+
# @query.not_contained_in("additional_info.deals.deal_name", ["Christmas Deal", "Summer Deal"])
278+
#
271279
# @return [Contentstack::Query]
272280
def not_contained_in(field_uid, values)
273281
add_query_hash({:"#{field_uid}" => {"$nin" => values}})
@@ -377,6 +385,7 @@ def descending(field_uid)
377385
# @param [String] code The locale code of the entry
378386
#
379387
# Example
388+
# Change language method
380389
# @query = @stack.content_type('category').query
381390
# @query.locale('en-us')
382391
#

0 commit comments

Comments
 (0)