8000 Skip optimization if decorated collection does not support it. by varyonic · Pull Request #4068 · activeadmin/activeadmin · GitHub
[go: up one dir, main page]

Skip to content

Skip optimization if decorated collection does not support it. #4068

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/active_admin/views/components/paginated_collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def build_pagination
options[:params] = @params if @params
options[:param_name] = @param_name if @param_name

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