Method: Contentstack::Query#ascending
- Defined in:
- lib/contentstack/query.rb
permalink #ascending(field_uid) ⇒ Contentstack::Query
Sort the results in ascending order with the given key. Sort the returned entries in ascending order of the provided key.
Example
@query = @stack.content_type('category').query
@query.ascending
373 374 375 376 377 |
# File 'lib/contentstack/query.rb', line 373 def ascending(field_uid) @query.delete(:desc) @query[:asc] = field_uid self end |