Skip to content

Commit

Permalink
Fix issue with relationship sorts due to missing join_manager
Browse files Browse the repository at this point in the history
  • Loading branch information
lgebhardt committed Jan 10, 2024
1 parent 769b07a commit 8aa212b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/jsonapi/active_relation_retrieval_v09.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ def find_fragments(filters, options)
filters: filters,
sort_criteria: sort_criteria)

options[:_relation_helper_options] = { join_manager: join_manager, sort_fields: [] }
options[:_relation_helper_options] = {
context: context,
join_manager: join_manager,
sort_fields: []
}

include_directives = options[:include_directives]

records = records(options)
Expand All @@ -114,7 +119,7 @@ def find_fragments(filters, options)

records = filter_records(records, filters, options)

records = sort_records(records, order_options, context)
records = sort_records(records, order_options, options)

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

Expand Down

0 comments on commit 8aa212b

Please sign in to comment.