Skip to content

Commit 4bf8632

Browse files
authored
Merge pull request #815 from cerebris/remove_dup_method
Remove duplicate `find_records` method.
2 parents f747e90 + fc858c0 commit 4bf8632

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

lib/jsonapi/resource.rb

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,20 +1041,6 @@ def register_relationship(name, relationship_object)
10411041

10421042
private
10431043

1044-
def find_records(filters, options = {})
1045-
context = options[:context]
1046-
1047-
records = filter_records(filters, options)
1048-
1049-
sort_criteria = options.fetch(:sort_criteria) { [] }
1050-
order_options = construct_order_options(sort_criteria)
1051-
records = sort_records(records, order_options, context)
1052-
1053-
records = apply_pagination(records, options[:paginator], order_options)
1054-
1055-
records
1056-
end
1057-
10581044
def cached_resources_for(records, serializer, options)
10591045
if records.is_a?(Array) && records.all?{|rec| rec.is_a?(JSONAPI::Resource)}
10601046
resources = records.map{|r| [r.id, r] }.to_h

0 commit comments

Comments
 (0)