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.
#size
#count
1 parent 9dee9d8 commit 3a31499Copy full SHA for 3a31499
lib/jsonapi/pagination.rb
@@ -63,7 +63,7 @@ def jsonapi_pagination_meta(resources)
63
numbers = { current: page }
64
65
if resources.respond_to?(:unscope)
66
- total = resources.unscope(:limit, :offset, :order).count()
+ total = resources.unscope(:limit, :offset, :order).size
67
else
68
# Try to fetch the cached size first
69
total = resources.instance_variable_get(:@original_size)
0 commit comments