Skip to content

Commit 07888a9

Browse files
authored
Fix issue with relationship sorts due to missing join_manager (#1443)
1 parent f75acdb commit 07888a9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/jsonapi/active_relation_retrieval_v09.rb

+7-2
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,12 @@ def find_fragments(filters, options = {})
107107
filters: filters,
108108
sort_criteria: sort_criteria)
109109

110-
options[:_relation_helper_options] = { join_manager: join_manager, sort_fields: [] }
110+
options[:_relation_helper_options] = {
111+
context: context,
112+
join_manager: join_manager,
113+
sort_fields: []
114+
}
115+
111116
include_directives = options[:include_directives]
112117

113118
records = records(options)
@@ -116,7 +121,7 @@ def find_fragments(filters, options = {})
116121

117122
records = filter_records(records, filters, options)
118123

119-
records = sort_records(records, order_options, context)
124+
records = sort_records(records, order_options, options)
120125

121126
records = apply_pagination(records, options[:paginator], order_options)
122127

0 commit comments

Comments
 (0)