We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8693902 commit 481f2f5Copy full SHA for 481f2f5
lib/jsonapi/query_builder/mixins/sort/dynamic.rb
@@ -17,7 +17,7 @@ def matches?(sort_attribute)
17
end
18
19
def results(collection, sort_param)
20
- dynamic_attribute = sort_param.attribute.sub(attribute_prefix, "")
+ dynamic_attribute = sort_param.attribute.delete_prefix(attribute_prefix)
21
if sort.respond_to?(:call)
22
sort.call(collection, dynamic_attribute, sort_param.direction)
23
else
0 commit comments