lib/crunchbase/utilities/search_query_parameters.rb in crunchbase4-0.2.5 vs lib/crunchbase/utilities/search_query_parameters.rb in crunchbase4-0.2.6

- old
+ new

@@ -25,10 +25,16 @@ # after_id: string($uuid) # Used to paginate search results to the next page. # after_id should be the uuid of the last item in the current page. May not be provided simultaneously with before_id. def query_parameters(args) order_field_ids = args[:order_field_ids] || ['updated_at'] - order_conditions = order_field_ids.map { |field_id| { 'field_id' => field_id, 'sort' => (args[:sort] || 'desc'), 'nulls' => 'last' } } + order_conditions = order_field_ids.map do |field_id| + { + 'field_id' => field_id, + 'sort' => (args[:sort] || 'desc'), + 'nulls' => 'last' + } + end params = { 'field_ids' => default_field_ids + (args[:field_ids] || []).uniq, 'order' => order_conditions, 'limit' => args[:limit] || 1000