Skip to content

Commit 8aa212b

Browse files
committed
Fix issue with relationship sorts due to missing join_manager
1 parent 769b07a commit 8aa212b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/jsonapi/active_relation_retrieval_v09.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,12 @@ def find_fragments(filters, options)
105105
filters: filters,
106106
sort_criteria: sort_criteria)
107107

108-
options[:_relation_helper_options] = { join_manager: join_manager, sort_fields: [] }
108+
options[:_relation_helper_options] = {
109+
context: context,
110+
join_manager: join_manager,
111+
sort_fields: []
112+
}
113+
109114
include_directives = options[:include_directives]
110115

111116
records = records(options)
@@ -114,7 +119,7 @@ def find_fragments(filters, options)
114119

115120
records = filter_records(records, filters, options)
116121

117-
records = sort_records(records, order_options, context)
122+
records = sort_records(records, order_options, options)
118123

119124
records = apply_pagination(records, options[:paginator], order_options)
120125

0 commit comments

Comments
 (0)