8000 Merge pull request #4068 from varyonic/4059-paginated-array-collection · activeadmin/activeadmin@8032624 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8032624

Browse files
committed
Merge pull request #4068 from varyonic/4059-paginated-array-collection
Skip optimization if decorated collection does not support it.
2 parents e268bfd + 60903e6 commit 8032624

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/active_admin/views/components/paginated_collection.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def build_pagination
100100
options[:params] = @params if @params
101101
options[:param_name] = @param_name if @param_name
102102

103-
if !@display_total
103+
if !@display_total && collection.respond_to?(:offset)
104104
# The #paginate method in kaminari will query the resource with a
105105
# count(*) to determine how many pages there should be unless
106106
# you pass in the :total_pages option. We issue a query to determine

0 commit comments

Comments
 (0)
0