Skip to content

Commit 02d693a

Browse files
authored
Merge pull request #71 from MPursche/fixed_sort_for_arrays
Sort and pagination was applied in wrong order for Arrays
2 parents 1029176 + 6b734ca commit 02d693a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/jsonapi/utils/response/formatters.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ def result_options(records, options)
6262

6363
def build_collection(records, options = {})
6464
records = apply_filter(records, options)
65-
records = apply_pagination(records, options)
6665
records = apply_sort(records)
66+
records = apply_pagination(records, options)
6767
records.respond_to?(:to_ary) ? records.map { |record| turn_into_resource(record, options) } : []
6868
end
6969

0 commit comments

Comments
 (0)