Sha256: 2b5c81582158051808130b56fc97e98ce499d32f94eda33c73036d6be72504d6
Contents?: true
Size: 720 Bytes
Versions: 12
Compression:
Stored size: 720 Bytes
Contents
# frozen_string_literal: true require 'easy/jsonapi/request/query_param_collection/query_param' module JSONAPI class Request class QueryParamCollection < JSONAPI::NameValuePairCollection # Used to create a unique Sort JSONAPI::Request::QueryParamCollection::QueryParam class SortParam < QueryParam # @param res_field_arr [Array<JSONAPI::Field] The resource fields # to sort the primary resources by. def initialize(res_field_arr) super('sorts', res_field_arr) end # Represent sort as query string def to_s "sort=#{JSONAPI::Utility.to_string_collection(value, delimiter: ',')}" end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems